1
0
Fork 0

Fix Windows test regression from commit 149250a

Commit: 149250ab92

ProcessExecutor::escape handled a false value inconsistently across
platforms, returning an emtpy string on Windows, otherwise `''`. This
is fixed to return `""` on Windows.

The GitDownloaderTest code has been appropriately updated.
pull/8419/head
johnstevenson 2019-11-07 09:53:22 +00:00
parent 1c012b74a6
commit 7e649fac41
2 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ class ProcessExecutor
//@see https://bugs.php.net/bug.php?id=43784
//@see https://bugs.php.net/bug.php?id=49446
if ('\\' === DIRECTORY_SEPARATOR) {
if ('' === $argument) {
if ((string) $argument === '') {
return escapeshellarg($argument);
}

View File

@ -734,7 +734,7 @@ composer https://github.com/old/url (push)
$cmd = str_replace('cd ', 'cd /D ', $cmd);
$cmd = str_replace('composerPath', getcwd().'/composerPath', $cmd);
return str_replace('""', '', strtr($cmd, "'", '"'));
return strtr($cmd, "'", '"');
}
return $cmd;