diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-18 12:48:03 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-18 12:48:03 +0200 |
commit | 016cf11134e4b55b85e52581d48bfef00a54149e (patch) | |
tree | a2c9c16c5993fe7eac00955ee79cebb8612da3a2 /core | |
parent | 03965053c34bc0fe673ea0da82ac83ff68ce3fa3 (diff) | |
download | nextcloud-server-016cf11134e4b55b85e52581d48bfef00a54149e.tar.gz nextcloud-server-016cf11134e4b55b85e52581d48bfef00a54149e.zip |
Return error code on failure with occ app:enable/disable
Diffstat (limited to 'core')
-rw-r--r-- | core/command/app/disable.php | 2 | ||||
-rw-r--r-- | core/command/app/enable.php | 2 |
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'); |