1
0
Fork 0

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

pull/10718/head
Pavel Djundik 2022-04-06 22:46:57 +03:00 committed by GitHub
parent 106149d102
commit c2598790f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

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