From b8391235c6638b43aa3cf089c31965a54832b67d Mon Sep 17 00:00:00 2001 From: MCJ Vasseur <14887731+mvr320@users.noreply.github.com> Date: Sat, 11 Sep 2021 11:03:31 +0200 Subject: [PATCH] Fail explicit when default Database values differ Also simplified the code by removing the else and using that as the default outcome. --- .../CheckDatabaseConfigurationDefaultValuesCommand.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/webapp/src/Command/CheckDatabaseConfigurationDefaultValuesCommand.php b/webapp/src/Command/CheckDatabaseConfigurationDefaultValuesCommand.php index 7149445a20..ffbe6dc0cf 100644 --- a/webapp/src/Command/CheckDatabaseConfigurationDefaultValuesCommand.php +++ b/webapp/src/Command/CheckDatabaseConfigurationDefaultValuesCommand.php @@ -64,13 +64,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int break; } } - if (empty($messages)) { - $style->success('All default values have the correct type'); - } else { + if (!empty($messages)) { $style->error('Some default values have the wrong type:'); $style->listing($messages); + return Command::FAILURE; } - + $style->success('All default values have the correct type'); return Command::SUCCESS; } }