Skip to content

Commit

Permalink
pass callback
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Nov 3, 2023
1 parent 840f199 commit ce0e236
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Helpers/LocalMachineHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 <n> bytes failed with errno=32 Broken pipe" errors.
set_error_handler(static fn () => NULL);
Expand Down

0 comments on commit ce0e236

Please sign in to comment.