diff --git a/run-tests.php b/run-tests.php index 8e6f7f519fb9d..805e2ccaa5603 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1260,6 +1260,13 @@ function system_with_timeout( ) { global $valgrind; + // when proc_open cmd is passed as a string (without bypass_shell=true option) the cmd goes thru shell + // and on Windows quotes are discarded, this is a fix to honor the quotes and allow values containing + // spaces like '"C:\Program Files\PHP\php.exe"' to be passed as 1 argument correctly + if (IS_WINDOWS) { + $commandline = 'start "" /b /wait ' . $commandline; + } + $data = ''; $bin_env = [];