Fix runLocally cd to remote dir

This commit is contained in:
Anton Medvedev 2017-08-16 11:47:12 +03:00
parent 8d0fcfa16c
commit 6c7311200d
2 changed files with 1 additions and 6 deletions

View File

@ -23,6 +23,7 @@
- Improved the way `ParallelExecutor` handles option parameters
- Fixed no `stage` argument in parallel mode [#1299]
- Improved environment variables management
- Fixed `runLocally` to not cd into remote dir
### Removed
- Removed `terminate_message` option

View File

@ -317,14 +317,8 @@ function runLocally($command, $options = [])
{
$process = Deployer::get()->processRunner;
$hostname = 'localhost';
$workingPath = get('working_path', '');
$command = parse($command);
if (!empty($workingPath)) {
$command = "cd $workingPath && ($command)";
}
$env = get('env', []) + ($options['env'] ?? []);
if (!empty($env)) {
$env = array_to_string($env);