deployer: `dep ssh` does not work with fish shell on remote system
Q | A |
---|---|
Issue Type | Bug (or feature request?) |
Deployer Version | 6.0.3 |
Local Machine OS | archlinux 2017-09 |
Remote Machine OS | debian stretch |
Description
dep ssh
does not work with fish shell on the remote system:
hiciu@unknown ~/d/k/d/s/blog (feature/deployer)> dep ssh
Select host:
[blog.xxxxxxxxx.dev] blog-xxxxxxxxx@blog.xxxxxxxxx.dev
[blog.xxxxxxxxx ] blog-xxxxxxxxx@blog.xxxxxxxxx
> blog.xxxxxxxxx.dev
The authenticity of host 'blog.xxxxxxxxx.dev (192.168.150.59)' can't be established.
ECDSA key fingerprint is SHA256:+PjtDcpz+TZrYb9XcLMMVRE4uovxFYgsUBVMVsuPCiU.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'blog.xxxxxxxxx.dev,192.168.150.59' (ECDSA) to the list of known hosts.
cd: The directory “/containers/blog-xxxxxxxxx/domains/blog.xxxxxxxxx/deployer/current” does not exist
/usr/share/fish/functions/cd.fish (line 30): builtin cd $argv
^
in function “cd”
called on standard input
with parameter list “/containers/blog-xxxxxxxxx/domains/blog.xxxxxxxxx/deployer/current”
Variables may not be used as commands. In fish, please define a function or use 'eval $SHELL'.
fish: cd /containers/blog-xxxxxxxxx/domains/blog.xxxxxxxxx/deployer/current; exec $SHELL -l
^
Connection to blog.xxxxxxxxx.dev closed.
Steps to reproduce
- setup account with fish shell on the remote system:
chsh -s /usr/bin/fish
- setup deploy.php which points to that host
- connect with
dep ssh
Content of deploy.php
<?php
namespace Deployer;
require 'recipe/common.php';
define('CONTAINER', 'blog-xxxxxxxxx');
define('DOMAIN', 'blog.xxxxxxxxx');
host(sprintf('%s.dev', DOMAIN))
->stage('vagrant')
->user(CONTAINER)
->set('deploy_path', sprintf('/containers/%s/domains/%s/deployer', CONTAINER, DOMAIN));
Output log
With enabled option for verbose output -vvv
.
hiciu@unknown ~/s/2/2/temp> dep -vvv ssh
cd: The directory “/containers/blog-xxxxxxxxx/domains/blog.xxxxxxxxx/deployer/current” does not exist
/usr/share/fish/functions/cd.fish (line 30): builtin cd $argv
^
in function “cd”
called on standard input
with parameter list “/containers/blog-xxxxxxxxx/domains/blog.xxxxxxxxx/deployer/current”
Variables may not be used as commands. In fish, please define a function or use 'eval $SHELL'.
fish: cd /containers/blog-xxxxxxxxx/domains/blog.xxxxxxxxx/deployer/current; exec $SHELL -l
^
Connection to blog.xxxxxxxxx.dev closed.
Comments
For the simple tasks deployer works just fine with fish.
The offending line is here: https://github.com/deployphp/deployer/blob/master/src/Console/SshCommand.php#L87
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 17 (7 by maintainers)
Hello,
I have new patch for 6.2.0. It seems to be working fine on my system.
after patching that on my local version
dep deploy
fails with:I think deployer should explicitly call
bash
. This patch allows me to deploy stuff withfish
on the remote system:Now it’s fixed in https://github.com/deployphp/deployer/pull/2458
I checked in sith fish as default on the remote server and with zsh on the remote server. Works!