From e6440e8a06851bf7fee3a7fe02c57ee4b932edcf Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Fri, 14 Nov 2025 12:37:41 +0100 Subject: [PATCH] fix: use PHP_BINARY when executing generate-all workers Signed-off-by: Richard Steinmetz --- lib/Command/Generate.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Command/Generate.php b/lib/Command/Generate.php index 9b99d7a..2626644 100644 --- a/lib/Command/Generate.php +++ b/lib/Command/Generate.php @@ -124,7 +124,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int } private function executeCoordinator(InputInterface $input) { - $workerCount = (int)$input->getOption(self::OPT_WORKERS); if ($workerCount <= 0) { $this->output->writeln("Invalid worker count: $workerCount"); @@ -145,10 +144,9 @@ private function executeCoordinator(InputInterface $input) { $workerPids[] = $pid; } else { // Child - $argv = $_SERVER['argv']; $env = getenv(); $env[self::ENV_WORKER_CONF] = json_encode($workerconfig, JSON_THROW_ON_ERROR); - pcntl_exec($argv[0], array_slice($argv, 1), $env); + pcntl_exec(PHP_BINARY, $_SERVER['argv'], $env); } }