aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-10-24 16:55:45 +0200
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2023-11-06 15:26:16 +0100
commita1a7774374c46dd3e904035237e02cb20b37f0e5 (patch)
tree583eaa972401090d4203bb8b95d674eeb2ac3c61
parentb5eeaa90d7fd417a10e6c5096ee9643548e8a4d9 (diff)
downloadnextcloud-server-a1a7774374c46dd3e904035237e02cb20b37f0e5.tar.gz
nextcloud-server-a1a7774374c46dd3e904035237e02cb20b37f0e5.zip
Use constants for SUCCESS/FAILURE and show errors even on quiet level
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--core/Command/SetupChecks.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/Command/SetupChecks.php b/core/Command/SetupChecks.php
index d43b5a07592..f31acba63e3 100644
--- a/core/Command/SetupChecks.php
+++ b/core/Command/SetupChecks.php
@@ -66,12 +66,15 @@ class SetupChecks extends Base {
'error' => '❌',
default => 'ℹ',
};
+ $verbosity = ($check->getSeverity() === 'error' ? OutputInterface::VERBOSITY_QUIET : OutputInterface::VERBOSITY_NORMAL);
+ $description = $check->getDescription();
$output->writeln(
"\t\t<{$styleTag}>".
"{$emoji} ".
$title.
- ($check->getDescription() !== null ? ': '.$check->getDescription() : '').
- "</{$styleTag}>"
+ ($description !== null ? ': '.$description : '').
+ "</{$styleTag}>",
+ $verbosity
);
}
}
@@ -79,10 +82,10 @@ class SetupChecks extends Base {
foreach ($results as $category => $checks) {
foreach ($checks as $title => $check) {
if ($check->getSeverity() !== 'success') {
- return 1;
+ return self::FAILURE;
}
}
}
- return 0;
+ return self::SUCCESS;
}
}