[updater] keep maintenance active on failure and mark failure in red
This commit is contained in:
parent
fe42553e8a
commit
c86e129ce9
|
@ -130,7 +130,8 @@ class Upgrade extends Command {
|
|||
function ($success) use($output, $updateStepEnabled, $self) {
|
||||
$mode = $updateStepEnabled ? 'Update' : 'Update simulation';
|
||||
$status = $success ? 'successful' : 'failed' ;
|
||||
$message = "<info>$mode $status</info>";
|
||||
$type = $success ? 'info' : 'error';
|
||||
$message = "<$type>$mode $status</$type>";
|
||||
$output->writeln($message);
|
||||
});
|
||||
$updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) {
|
||||
|
|
|
@ -200,7 +200,7 @@ class Updater extends BasicEmitter {
|
|||
|
||||
$this->emit('\OC\Updater', 'updateEnd', array($success));
|
||||
|
||||
if(!$wasMaintenanceModeEnabled) {
|
||||
if(!$wasMaintenanceModeEnabled && $success) {
|
||||
$this->config->setSystemValue('maintenance', false);
|
||||
$this->emit('\OC\Updater', 'maintenanceDisabled');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue