Skip to content

Commit

Permalink
Fix Symfony 5/6
Browse files Browse the repository at this point in the history
Xavier Marchegay committed Jan 26, 2023
1 parent 0a42088 commit 7ead8d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Model/SubprocessInstance.php
Original file line number Diff line number Diff line change
@@ -121,8 +121,14 @@ public function buildProcess()
$arguments[] = $this->processCode;

$this->process = new Process($arguments, null, null, $this->input);
$this->process->setCommandLine($this->process->getCommandLine());
$this->process->inheritEnvironmentVariables();

if (method_exists(Process::class, 'fromShellCommandline')) {
$this->process = Process::fromShellCommandline($this->process->getCommandLine(), null, null, $this->input);
} else {
$this->process->setCommandLine($this->process->getCommandLine());
$this->process->inheritEnvironmentVariables();
}

$this->process->enableOutput();

return $this;

0 comments on commit 7ead8d0

Please sign in to comment.