Ignore env that already set in shell scripts

This commit is contained in:
crazywhalecc 2024-10-03 10:53:22 +08:00 committed by Jerry Ma
parent 7325368a4f
commit 0568d4b4c8

View File

@ -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);
}
}
}
}