diff --git a/lib/private/console/application.php b/lib/private/console/application.php index c46e6d60de24..e6d8677b72ec 100644 --- a/lib/private/console/application.php +++ b/lib/private/console/application.php @@ -55,7 +55,12 @@ public function loadCommands(OutputInterface $output) { $application = $this->application; require_once __DIR__ . '/../../../core/register_command.php'; if ($this->config->getSystemValue('installed', false)) { - if (!\OCP\Util::needUpgrade()) { + if (\OCP\Util::needUpgrade()) { + $output->writeln("ownCloud or one of the apps require upgrade - only a limited number of commands are available"); + $output->writeln("You may use your browser or the occ upgrade command to do the upgrade"); + } elseif ($this->config->getSystemValue('maintenance', false)) { + $output->writeln("ownCloud is in maintenance mode - no app have been loaded"); + } else { OC_App::loadApps(); foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) { $appPath = \OC_App::getAppPath($app); @@ -68,9 +73,6 @@ public function loadCommands(OutputInterface $output) { require $file; } } - } else { - $output->writeln("ownCloud or one of the apps require upgrade - only a limited number of commands are available"); - $output->writeln("You may use your browser or the occ upgrade command to do the upgrade"); } } else { $output->writeln("ownCloud is not installed - only a limited number of commands are available");