Fix run-script not setting Path correctly on Windows (#10700)

main
Pavel Djundik 2 years ago committed by GitHub
parent 106149d102
commit c2598790f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save