explicitly pass env to process handler, fails in docker otherwise (??????)

This commit is contained in:
DubbleClick
2025-06-02 15:12:44 +07:00
parent 4b0fa94b3c
commit 6b689f1584

View File

@@ -131,7 +131,8 @@ class CraftCommand extends BaseCommand
} }
$prefix = PHP_SAPI === 'cli' ? [PHP_BINARY, $argv[0]] : [$argv[0]]; $prefix = PHP_SAPI === 'cli' ? [PHP_BINARY, $argv[0]] : [$argv[0]];
$process = new Process([...$prefix, $cmd, '--no-motd', ...$args], timeout: null); $env = getenv();
$process = new Process([...$prefix, $cmd, '--no-motd', ...$args], env: $env, timeout: null);
$this->log("Running: {$process->getCommandLine()}", true); $this->log("Running: {$process->getCommandLine()}", true);
if (PHP_OS_FAMILY === 'Windows') { if (PHP_OS_FAMILY === 'Windows') {