[updater] keep maintenance active on failure and mark failure in red

This commit is contained in:
Morris Jobke 2015-06-23 14:45:53 +02:00
parent fe42553e8a
commit c86e129ce9
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -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 {