From ce0e23601e307d64e08d8fbd5330cde393c1527c Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Fri, 3 Nov 2023 12:26:26 -0700 Subject: [PATCH] pass callback --- src/Helpers/LocalMachineHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);