diff --git a/src/Helpers/LocalMachineHelper.php b/src/Helpers/LocalMachineHelper.php index 0a7b63ec6..5c9b9f1eb 100644 --- a/src/Helpers/LocalMachineHelper.php +++ b/src/Helpers/LocalMachineHelper.php @@ -129,7 +129,7 @@ private function executeProcess(Process $process, callable $callback = NULL, boo }; } if ($process->getInput()) { - $this->runAsync($process); + $this->runAsync($process, $callback); } else { $process->run($callback); @@ -146,8 +146,8 @@ private function executeProcess(Process $process, callable $callback = NULL, boo /** * Run the $process asynchronously as a workaround for https://github.com/symfony/symfony/issues/21580. */ - private function runAsync(Process $process): void { - $process->start(); + private function runAsync(Process $process, callable $callback): void { + $process->start($callback); // Ignore "Write of bytes failed with errno=32 Broken pipe" errors. set_error_handler(static fn () => NULL);