From 34d27817d40aae56b492d152f6458b5c26350169 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Tue, 13 Feb 2018 18:35:53 +0100 Subject: [PATCH] Avoid running the remove command without any packages As the exit code of the command was not checked, the failure was not breaking things, but it was still printing a confusing error message. --- src/Symfony/Bridge/PhpUnit/bin/simple-phpunit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit index fd7c800fedfd7..2f97e32e11819 100755 --- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit +++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit @@ -77,7 +77,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ $zip->extractTo(getcwd()); $zip->close(); chdir("phpunit-$PHPUNIT_VERSION"); - passthru("$COMPOSER remove --no-update ".$SYMFONY_PHPUNIT_REMOVE); + if ($SYMFONY_PHPUNIT_REMOVE) { + passthru("$COMPOSER remove --no-update ".$SYMFONY_PHPUNIT_REMOVE); + } if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) { passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\""); }