Skip to content

Commit

Permalink
[PhpUnitBridge] fix running simple-phpunit on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 5, 2019
1 parent 77747a9 commit d9833ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Symfony/Bridge/PhpUnit/bin/simple-phpunit
Expand Up @@ -94,8 +94,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
}
$prevRoot = getenv('COMPOSER_ROOT_VERSION');
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99");
$q = '\\' === DIRECTORY_SEPARATOR ? '"' : '';
// --no-suggest is not in the list to keep compat with composer 1.0, which is shipped with Ubuntu 16.04LTS
$exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd()));
$exit = proc_close(proc_open("$q$COMPOSER install --no-dev --prefer-dist --no-progress --ansi$q", array(), $p, getcwd()));
putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : ''));
if ($exit) {
exit($exit);
Expand Down

0 comments on commit d9833ac

Please sign in to comment.