From 284da1487c4574352ba54a0d60c23d7ebd9e31b5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 31 Oct 2018 17:36:38 +0100 Subject: [PATCH] Avoid downgrading from error to warning --- src/Composer/Command/DiagnoseCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php index 893bd5d52..f4d642f49 100644 --- a/src/Composer/Command/DiagnoseCommand.php +++ b/src/Composer/Command/DiagnoseCommand.php @@ -474,10 +474,10 @@ EOT if ($hadError) { $io->write('FAIL'); - $this->exitCode = 2; + $this->exitCode = max($this->exitCode, 2); } elseif ($hadWarning) { $io->write('WARNING'); - $this->exitCode = 1; + $this->exitCode = max($this->exitCode, 1); } if ($result) { @@ -716,7 +716,7 @@ EOT * * @return bool|string */ - private function checkConnectivity() + private function checkConnectivity() { if (!ini_get('allow_url_fopen')) { $result = 'Skipped because allow_url_fopen is missing.';