mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
Ignore env that already set in shell scripts
This commit is contained in:
@@ -101,7 +101,9 @@ class GlobalEnvManager
|
||||
private static function applyConfig(array $ini): void
|
||||
{
|
||||
foreach ($ini as $k => $v) {
|
||||
self::putenv($k . '=' . $v);
|
||||
if (getenv($k) === false) {
|
||||
self::putenv($k . '=' . $v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user