Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-02-25 13:05:22 +0300
committerJulius Härtl <jus@bitgrid.net>2021-02-25 13:05:22 +0300
commit0c4c7ceb061788cc91c15f3c2c122c0dde2c4633 (patch)
tree7f169034d03864dee579de9d4dd302f10a9e6f81 /lib
parent18d7e2ccc7561ff82210d6f28fdb09329f1c8b79 (diff)
Add proper return values to occ commands
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Command/ActivateConfig.php2
-rw-r--r--lib/Command/UpdateEmptyTemplates.php2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/Command/ActivateConfig.php b/lib/Command/ActivateConfig.php
index 68413521..9c3edfa8 100644
--- a/lib/Command/ActivateConfig.php
+++ b/lib/Command/ActivateConfig.php
@@ -77,10 +77,12 @@ class ActivateConfig extends Command {
$this->capabilitiesService->clear();
$this->capabilitiesService->refetch();
$output->writeln('<info>Activated any config changes</info>');
+ return 0;
} catch (\Exception $e) {
$output->writeln('<error>Failed to activate any config changes</error>');
$output->writeln($e->getMessage());
$output->writeln($e->getTraceAsString());
+ return 1;
}
}
diff --git a/lib/Command/UpdateEmptyTemplates.php b/lib/Command/UpdateEmptyTemplates.php
index d1adfdf6..e83cda2d 100644
--- a/lib/Command/UpdateEmptyTemplates.php
+++ b/lib/Command/UpdateEmptyTemplates.php
@@ -50,10 +50,12 @@ class UpdateEmptyTemplates extends Command {
try {
$this->templateManager->updateEmptyTemplates();
$output->writeln('<info>Empty template files were updated</info>');
+ return 0;
} catch (\Exception $e) {
$output->writeln('<error>Failed to update templates</error>');
$output->writeln($e->getMessage());
$output->writeln($e->getTraceAsString());
+ return 1;
}
}