mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 01:02:24 +01:00
Change run command default path
This commit is contained in:
parent
9d725ede63
commit
235ab61ad5
@ -14,6 +14,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface as Input;
|
||||
use Symfony\Component\Console\Input\InputOption as Option;
|
||||
use Symfony\Component\Console\Output\OutputInterface as Output;
|
||||
use function Deployer\has;
|
||||
use function Deployer\run;
|
||||
|
||||
class RunCommand extends SelectCommand
|
||||
@ -57,6 +58,9 @@ class RunCommand extends SelectCommand
|
||||
$this->applyOverrides($hosts, $input->getOption('option'));
|
||||
|
||||
$task = new Task($command, function () use ($command) {
|
||||
if (has('current_path')) {
|
||||
$command = "cd {{current_path}}; $command";
|
||||
}
|
||||
run($command);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user