File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1010use Deployer \Deployer ;
1111use Deployer \Task \Context ;
1212use Deployer \Task \Task ;
13- use Symfony \Component \Console \Input \InputArgument ;
1413use Symfony \Component \Console \Input \InputInterface as Input ;
1514use Symfony \Component \Console \Input \InputOption as Option ;
1615use Symfony \Component \Console \Output \OutputInterface as Output ;
1716use function Deployer \cd ;
1817use function Deployer \get ;
1918use function Deployer \has ;
2019use function Deployer \run ;
20+ use function Deployer \test ;
2121use function Deployer \writeln ;
2222
2323class RunCommand extends SelectCommand
@@ -58,7 +58,10 @@ protected function execute(Input $input, Output $output): int
5858
5959 $ task = new Task ($ command , function () use ($ command ) {
6060 if (has ('current_path ' )) {
61- cd (get ('current_path ' ));
61+ $ path = get ('current_path ' );
62+ if (test ("[ -d $ path ] " )) {
63+ cd ($ path );
64+ }
6265 }
6366 $ output = run ($ command );
6467 writeln ($ output );
You can’t perform that action at this time.
0 commit comments