post merge fixes

This commit is contained in:
DubbleClick
2025-06-09 14:48:05 +07:00
parent 187d51e501
commit 20f222d19e
8 changed files with 32 additions and 78 deletions

View File

@@ -75,24 +75,4 @@ class WindowsCmd
$this->env = array_merge($this->env, $env);
return $this;
}
/**
* @throws RuntimeException
*/
public function execWithEnv(string $cmd): WindowsCmd
{
if ($this->getEnvString() !== '') {
return $this->exec($this->getEnvString() . "call {$cmd}");
}
return $this->exec($cmd);
}
private function getEnvString(): string
{
$str = '';
foreach ($this->env as $k => $v) {
$str .= 'set ' . $k . '=' . $v . ' && ';
}
return $str;
}
}