diff --git a/src/Command/Update/ExecuteCommand.php b/src/Command/Update/ExecuteCommand.php index 167ba913c..24abf462c 100644 --- a/src/Command/Update/ExecuteCommand.php +++ b/src/Command/Update/ExecuteCommand.php @@ -125,15 +125,20 @@ protected function execute(InputInterface $input, OutputInterface $output) update_fix_compatibility(); $updates = update_get_update_list(); $this->checkUpdates($io); + $maintenance_mode = $this->state->get('system.maintenance_mode', false); - $io->info($this->trans('commands.site.maintenance.description')); - $this->state->set('system.maintenance_mode', true); + if (!$maintenance_mode) { + $io->info($this->trans('commands.site.maintenance.description')); + $this->state->set('system.maintenance_mode', true); + } $this->runUpdates($io, $updates); $this->runPostUpdates($io); - $this->state->set('system.maintenance_mode', false); - $io->info($this->trans('commands.site.maintenance.messages.maintenance-off')); + if (!$maintenance_mode) { + $this->state->set('system.maintenance_mode', false); + $io->info($this->trans('commands.site.maintenance.messages.maintenance-off')); + } $this->chainQueue ->addCommand('cache:rebuild', ['cache' => 'all']);