summaryrefslogtreecommitdiffstats
path: root/lib/private/Console
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-29 15:35:36 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-09-29 15:57:10 +0200
commit6188955ed5dc506e22bfa513ec61a84a3e8ca8f8 (patch)
tree51c2b0f3e510c48b4fee6f2886e78973b1ff4b7f /lib/private/Console
parent5fc58713bfc699ff1a56a191099fa225f0e8b929 (diff)
downloadnextcloud-server-6188955ed5dc506e22bfa513ec61a84a3e8ca8f8.tar.gz
nextcloud-server-6188955ed5dc506e22bfa513ec61a84a3e8ca8f8.zip
Do not break the output when running _completion
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Console')
-rw-r--r--lib/private/Console/Application.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index cad16a070c8..3033d7beb86 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -88,10 +88,14 @@ class Application {
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) {
@@ -106,10 +110,10 @@ class Application {
}
}
}
- } 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)) {