From 0c4c7ceb061788cc91c15f3c2c122c0dde2c4633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 25 Feb 2021 11:05:22 +0100 Subject: [PATCH] Add proper return values to occ commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Command/ActivateConfig.php | 2 ++ lib/Command/UpdateEmptyTemplates.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/Command/ActivateConfig.php b/lib/Command/ActivateConfig.php index 6841352168..9c3edfa831 100644 --- a/lib/Command/ActivateConfig.php +++ b/lib/Command/ActivateConfig.php @@ -77,10 +77,12 @@ protected function execute(InputInterface $input, OutputInterface $output) { $this->capabilitiesService->clear(); $this->capabilitiesService->refetch(); $output->writeln('Activated any config changes'); + return 0; } catch (\Exception $e) { $output->writeln('Failed to activate any config changes'); $output->writeln($e->getMessage()); $output->writeln($e->getTraceAsString()); + return 1; } } diff --git a/lib/Command/UpdateEmptyTemplates.php b/lib/Command/UpdateEmptyTemplates.php index d1adfdf6ed..e83cda2d0a 100644 --- a/lib/Command/UpdateEmptyTemplates.php +++ b/lib/Command/UpdateEmptyTemplates.php @@ -50,10 +50,12 @@ protected function execute(InputInterface $input, OutputInterface $output) { try { $this->templateManager->updateEmptyTemplates(); $output->writeln('Empty template files were updated'); + return 0; } catch (\Exception $e) { $output->writeln('Failed to update templates'); $output->writeln($e->getMessage()); $output->writeln($e->getTraceAsString()); + return 1; } }