mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Use constants for SUCCESS/FAILURE and show errors even on quiet level
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
b5eeaa90d7
commit
a1a7774374
1 changed files with 7 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue