Skip to content

Commit

Permalink
Do not break the output when running _completion
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Sep 29, 2016
1 parent f2809ff commit f88c9eb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/private/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ public function loadCommands(InputInterface $input, OutputInterface $output) {
require_once __DIR__ . '/../../../core/register_command.php';
if ($this->config->getSystemValue('installed', false)) {
if (\OCP\Util::needUpgrade()) {
$output->writeln("Nextcloud 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");
if ($input->getArgument('command') !== '_completion') {
$output->writeln("Nextcloud 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("Nextcloud is in maintenance mode - no app have been loaded");
if ($input->getArgument('command') !== '_completion') {
$output->writeln("Nextcloud is in maintenance mode - no apps have been loaded");
}
} else {
OC_App::loadApps();
foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
Expand All @@ -106,10 +110,10 @@ public function loadCommands(InputInterface $input, OutputInterface $output) {
}
}
}
} else {
} else if ($input->getArgument('command') !== '_completion') {
$output->writeln("Nextcloud is not installed - only a limited number of commands are available");
}
$input = new ArgvInput();

if ($input->getFirstArgument() !== 'check') {
$errors = \OC_Util::checkServer(\OC::$server->getConfig());
if (!empty($errors)) {
Expand Down

0 comments on commit f88c9eb

Please sign in to comment.