1
0
Fork 0

Also allow backslashes to work on cmd.exe for plain executable paths, fixes #9707

pull/9735/head
Jordi Boggiano 2021-02-23 15:23:17 +01:00
parent cf2128a889
commit d855986c39
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 6 additions and 0 deletions

View File

@ -265,6 +265,12 @@ class EventDispatcher
$_SERVER['PHP_BINARY'] = $phpPath;
putenv('PHP_BINARY=' . $_SERVER['PHP_BINARY']);
}
if (Platform::isWindows()) {
$exec = preg_replace_callback('{^\S+}', function ($path) {
return str_replace('/', '\\', $path[0]);
}, $exec);
}
}
// if composer is being executed, make sure it runs the expected composer from current path