Issue #2635046 by neclimdul, dawehner, alexpott: run-test.sh doesn't work in directories with spaces

merge-requests/1654/head
Alex Pott 2018-06-25 11:25:06 +01:00
parent cdbb68bb8c
commit abc6c6a336
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 2 additions and 2 deletions

View File

@ -389,12 +389,12 @@ function simpletest_phpunit_command() {
// The file in Composer's bin dir is a *nix link, which does not work when
// extracted from a tarball and generally not on Windows.
$command = $vendor_dir . '/phpunit/phpunit/phpunit';
$command = escapeshellarg($vendor_dir . '/phpunit/phpunit/phpunit');
if (substr(PHP_OS, 0, 3) == 'WIN') {
// On Windows it is necessary to run the script using the PHP executable.
$php_executable_finder = new PhpExecutableFinder();
$php = $php_executable_finder->find();
$command = $php . ' -f ' . escapeshellarg($command) . ' --';
$command = $php . ' -f ' . $command . ' --';
}
return $command;
}