Skip to content

Commit

Permalink
Fix drush and other commands when using local shell provider
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed Jun 28, 2019
1 parent 28a04fb commit 1f2292c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ShellProvider/LocalShellProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,12 @@ public function createTunnelProcess(HostConfig $target_config, array $prefix = [
*/
public function wrapCommandInLoginShell(array $command)
{
return [
array_unshift(
$command,
'/bin/bash',
'--login',
'-c',
'\'' . implode(' ', $command). '\'',
];
'-c'
);
return $command;
}
}
13 changes: 13 additions & 0 deletions src/ShellProvider/SshShellProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,17 @@ public function copyFileFrom(
}
return parent::copyFileFrom($from_shell, $source_file_name, $target_file_name, $context, $verbose);
}

/**
* {@inheritdoc}
*/
public function wrapCommandInLoginShell(array $command)
{
return [
'/bin/bash',
'--login',
'-c',
'\'' . implode(' ', $command). '\'',
];
}
}

0 comments on commit 1f2292c

Please sign in to comment.