diff --git a/lib/private/console/application.php b/lib/private/console/application.php index e7ddeed7d25f..f6bb2c0a74c6 100644 --- a/lib/private/console/application.php +++ b/lib/private/console/application.php @@ -53,7 +53,12 @@ public function loadCommands(OutputInterface $output) { $application = $this->application; require_once \OC::$SERVERROOT . '/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); @@ -63,8 +68,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"); } } else { $output->writeln("ownCloud is not installed - only a limited number of commands are available");