Skip to content

Commit b1453c4

Browse files
mvoriseknielsdos
authored andcommitted
honor cmd quotes on Windows in run-tests.php
1 parent 89de497 commit b1453c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

run-tests.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,13 @@ function system_with_timeout(
11721172
) {
11731173
global $valgrind;
11741174

1175+
// when proc_open cmd is passed as a string (without bypass_shell=true option) the cmd goes thru shell
1176+
// and on Windows quotes are discarded, this is a fix to honor the quotes and allow values containing
1177+
// spaces like '"C:\Program Files\PHP\php.exe"' to be passed as 1 argument correctly
1178+
if (IS_WINDOWS) {
1179+
$commandline = 'start "" /b /wait ' . $commandline;
1180+
}
1181+
11751182
$data = '';
11761183

11771184
$bin_env = [];

0 commit comments

Comments
 (0)