mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Allow the remote shell path to be overridden by host config (#1708)
* Allow the remote shell path to be overridden by host config Allow the remote shell path to be overridden by host config -> right now i have the case that $SHELL is incorrect on the remote but I can't fix it (shared hosting). Secondly with this implementation I can explicitly select the shell via Host Config * Update SshCommand.php * Update SshCommand.php * #1706 php bin/changelog§
This commit is contained in:
parent
459c895eaf
commit
6625420b42
@ -4,6 +4,9 @@
|
||||
## master
|
||||
[v6.3.0...master](https://github.com/deployphp/deployer/compare/v6.3.0...master)
|
||||
|
||||
### Added
|
||||
- Support to define remote shell path via host-config [#1708] [#1709] [#1709]
|
||||
|
||||
### Changed
|
||||
- Laravel recipe should not run `artisan:cache:clear` in `deploy` task
|
||||
|
||||
@ -413,6 +416,8 @@
|
||||
- Fixed remove of shared dir on first deploy
|
||||
|
||||
|
||||
[#1709]: https://github.com/deployphp/deployer/issues/1709
|
||||
[#1708]: https://github.com/deployphp/deployer/pull/1708
|
||||
[#1677]: https://github.com/deployphp/deployer/pull/1677
|
||||
[#1671]: https://github.com/deployphp/deployer/issues/1671
|
||||
[#1663]: https://github.com/deployphp/deployer/issues/1663
|
||||
|
@ -80,10 +80,15 @@ class SshCommand extends Command
|
||||
}
|
||||
}
|
||||
|
||||
$shell_path = 'exec $SHELL -l';
|
||||
if ($host->has('shell_path')) {
|
||||
$shell_path = 'exec '.$host->get('shell_path').' -l';
|
||||
}
|
||||
|
||||
Context::push(new Context($host, $input, $output));
|
||||
$options = $host->getSshArguments();
|
||||
$deployPath = $host->get('deploy_path', '~');
|
||||
|
||||
passthru("ssh -t $options $host 'cd '''$deployPath/current'''; exec \$SHELL -l'");
|
||||
passthru("ssh -t $options $host 'cd '''$deployPath/current'''; $shell_path'");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user