Fix run-script not setting Path correctly on Windows (#10700)
parent
106149d102
commit
c2598790f4
|
@ -571,7 +571,11 @@ class EventDispatcher
|
|||
private function ensureBinDirIsInPath(): void
|
||||
{
|
||||
$pathEnv = 'PATH';
|
||||
if (false === Platform::getEnv('PATH') && false !== Platform::getEnv('Path')) {
|
||||
|
||||
// checking if only Path and not PATH is set then we probably need to update the Path env
|
||||
// on Windows getenv is case-insensitive so we cannot check it via Platform::getEnv and
|
||||
// we need to check in $_SERVER directly
|
||||
if (!isset($_SERVER[$pathEnv]) && isset($_SERVER['Path'])) {
|
||||
$pathEnv = 'Path';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue