From e7ce57df6a4bc3d0a9d696c7f630ce488cbfebf6 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Wed, 27 May 2020 15:00:36 -0700 Subject: [PATCH] Use Process::fromShellCommandline when constructing a Process object from a command string. (#950) --- src/Common/ExecCommand.php | 2 +- src/Task/Base/ParallelExec.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/ExecCommand.php b/src/Common/ExecCommand.php index aec7587bc..a5c92aa59 100644 --- a/src/Common/ExecCommand.php +++ b/src/Common/ExecCommand.php @@ -141,7 +141,7 @@ protected function getCommandDescription() protected function executeCommand($command) { // TODO: Symfony 4 requires that we supply the working directory. - $result_data = $this->execute(new Process($command, getcwd())); + $result_data = $this->execute(Process::fromShellCommandline($command, getcwd())); return new Result( $this, $result_data->getExitCode(), diff --git a/src/Task/Base/ParallelExec.php b/src/Task/Base/ParallelExec.php index 51c5a3991..f2ad960a8 100644 --- a/src/Task/Base/ParallelExec.php +++ b/src/Task/Base/ParallelExec.php @@ -78,7 +78,7 @@ public function printed($isPrinted = true) public function process($command) { // TODO: Symfony 4 requires that we supply the working directory. - $this->processes[] = new Process($this->receiveCommand($command), getcwd()); + $this->processes[] = Process::fromShellCommandline($this->receiveCommand($command), getcwd()); return $this; }