[Process] Fix command escaping
This commit is contained in:
parent
3d84153d68
commit
da3a2c4749
@ -103,13 +103,7 @@ class ProcessBuilder
|
|||||||
|
|
||||||
$options = $this->options;
|
$options = $this->options;
|
||||||
|
|
||||||
$arguments = $this->arguments;
|
$script = implode(' ', array_map('escapeshellarg', $this->arguments));
|
||||||
$command = array_shift($arguments);
|
|
||||||
|
|
||||||
$script = escapeshellcmd($command);
|
|
||||||
if ($arguments) {
|
|
||||||
$script .= ' '.implode(' ', array_map('escapeshellarg', $arguments));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->inheritEnv) {
|
if ($this->inheritEnv) {
|
||||||
$env = $this->env ? $this->env + $_ENV : null;
|
$env = $this->env ? $this->env + $_ENV : null;
|
||||||
|
Reference in New Issue
Block a user