mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 23:05:41 +08:00
add env manager
This commit is contained in:
@@ -62,7 +62,12 @@ class UnixShell
|
||||
|
||||
public function setEnv(array $env): UnixShell
|
||||
{
|
||||
$this->env = array_merge($this->env, $env);
|
||||
foreach ($env as $k => $v) {
|
||||
if ($v === '') {
|
||||
continue;
|
||||
}
|
||||
$this->env[$k] = $v;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user