summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
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');