aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-19 09:29:35 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-19 09:29:35 +0200
commit4c6dce220bf28fc1673b72a1414fd4d843c23d07 (patch)
treeadb4f9694c54c8f0e8f50bc735c278ae19464c65 /core
parentd9172a19070051660e5a94d84e54eaad6854acfd (diff)
parent016cf11134e4b55b85e52581d48bfef00a54149e (diff)
downloadnextcloud-server-4c6dce220bf28fc1673b72a1414fd4d843c23d07.tar.gz
nextcloud-server-4c6dce220bf28fc1673b72a1414fd4d843c23d07.zip
Merge pull request #18384 from owncloud/apps-command-returncode
Return error code on failure with occ app:enable/disable
Diffstat (limited to 'core')
-rw-r--r--core/command/app/disable.php2
-rw-r--r--core/command/app/enable.php2
2 files changed, 4 insertions, 0 deletions
diff --git a/core/command/app/disable.php b/core/command/app/disable.php
index 21a88f0a923..fc634bb32cf 100644
--- a/core/command/app/disable.php
+++ b/core/command/app/disable.php
@@ -47,9 +47,11 @@ class Disable extends Command {
$output->writeln($appId . ' disabled');
} catch(\Exception $e) {
$output->writeln($e->getMessage());
+ return 2;
}
} else {
$output->writeln('No such app enabled: ' . $appId);
+ return 1;
}
}
}
diff --git a/core/command/app/enable.php b/core/command/app/enable.php
index 2e68cfa97ff..d3733f0f133 100644
--- a/core/command/app/enable.php
+++ b/core/command/app/enable.php
@@ -43,8 +43,10 @@ class Enable extends Command {
$appId = $input->getArgument('app-id');
if (\OC_App::isEnabled($appId)) {
$output->writeln($appId . ' is already enabled');
+ return 2;
} else if (!\OC_App::getAppPath($appId)) {
$output->writeln($appId . ' not found');
+ return 1;
} else {
\OC_App::enable($appId);
$output->writeln($appId . ' enabled');