diff --git a/Classes/Command/BackendApiCommandController.php b/Classes/Command/BackendApiCommandController.php index 31e32e3..4665bdc 100644 --- a/Classes/Command/BackendApiCommandController.php +++ b/Classes/Command/BackendApiCommandController.php @@ -82,6 +82,7 @@ public function lockCommand($redirectUrl = NULL) { $this->outputLine($message); $this->logger->info($message); } + $this->quit(0); } /** @@ -99,6 +100,7 @@ public function unlockCommand() { $message = 'Removed lock file \'typo3conf/LOCK_BACKEND\''; $this->outputLine($message); $this->logger->info($message); + $this->quit(0); } } else { $message = 'No lock file \'typo3conf/LOCK_BACKEND\' was found, hence no lock could be removed.'; @@ -107,4 +109,4 @@ public function unlockCommand() { $this->quit(1); } } -} \ No newline at end of file +} diff --git a/Classes/Command/CacheApiCommandController.php b/Classes/Command/CacheApiCommandController.php index 5ffa7b7..3679c91 100644 --- a/Classes/Command/CacheApiCommandController.php +++ b/Classes/Command/CacheApiCommandController.php @@ -86,6 +86,7 @@ public function clearAllCachesCommand($hard = false) { $message = 'All caches have been cleared%s.'; $this->logger->info($message); $this->outputLine($message, $hard ? array(' hard') : array('')); + $this->quit(0); } /** @@ -103,6 +104,7 @@ public function assureCacheDirectoryIsWriteableCommand() { $this->logger->info($message); $this->outputLine($message); } + $this->quit(0); } /** @@ -115,13 +117,14 @@ public function clearSystemCacheCommand() { $message = 'System cache has been cleared'; $this->logger->info($message); $this->outputLine($message); + $this->quit(0); } /** * Clears the opcode cache. * * @param string|NULL $fileAbsPath The file as absolute path to be cleared - * or NULL to clear completely. + * or NULL to clear completely. * * @return void */ @@ -137,6 +140,7 @@ public function clearAllActiveOpcodeCacheCommand($fileAbsPath = NULL) { $this->outputLine($message); $this->logger->info($message); } + $this->quit(0); } /** @@ -149,6 +153,7 @@ public function clearConfigurationCacheCommand() { $message = 'Configuration cache has been cleared.'; $this->logger->info($message); $this->outputLine($message); + $this->quit(0); } /** @@ -161,6 +166,7 @@ public function clearPageCacheCommand() { $message = 'Page cache has been cleared.'; $this->logger->info($message); $this->outputLine($message); + $this->quit(0); } /** @@ -174,5 +180,6 @@ public function clearAllExceptPageCacheCommand() { $message = 'Cleared caches: ' . implode(', ', $clearedCaches); $this->logger->info($message); $this->outputLine($message); + $this->quit(0); } } diff --git a/Classes/Command/ConfigurationApiCommandController.php b/Classes/Command/ConfigurationApiCommandController.php index d0b1d44..0942501 100644 --- a/Classes/Command/ConfigurationApiCommandController.php +++ b/Classes/Command/ConfigurationApiCommandController.php @@ -47,6 +47,7 @@ class ConfigurationApiCommandController extends CommandController { */ public function listCommand() { $this->outputLine(json_encode($this->configurationApiService->getConfigurationArray())); + $this->quit(0); } /** @@ -57,5 +58,6 @@ public function listCommand() { */ public function showCommand($key) { $this->outputLine(json_encode($this->configurationApiService->getValue($key))); + $this->quit(0); } } diff --git a/Classes/Command/DatabaseApiCommandController.php b/Classes/Command/DatabaseApiCommandController.php index 2e00025..42ad7e5 100644 --- a/Classes/Command/DatabaseApiCommandController.php +++ b/Classes/Command/DatabaseApiCommandController.php @@ -90,7 +90,7 @@ public function databaseCompareCommand($actions = '', $dry = FALSE) { foreach ($actions as $number => $action) { $this->outputLine(' - ' . $action . ' => ' . $number); } - $this->quit(); + $this->quit(0); } $result = $this->databaseApiService->databaseCompare($actions, $dry); @@ -109,11 +109,13 @@ public function databaseCompareCommand($actions = '', $dry = FALSE) { $this->outputLine(LF); } $this->logger->info('DB compare executed in dry mode'); + $this->quit(0); } else { if (empty($result)) { $message = 'DB has been compared'; $this->outputLine($message); $this->logger->info($message); + $this->quit(0); } else { $message = vsprintf('DB could not be compared, Error(s): %s', array(LF . implode(LF, $result))); $this->outputLine($message); @@ -122,4 +124,4 @@ public function databaseCompareCommand($actions = '', $dry = FALSE) { } } } -} \ No newline at end of file +} diff --git a/Classes/Command/ExtensionApiCommandController.php b/Classes/Command/ExtensionApiCommandController.php index eef767b..3506d23 100755 --- a/Classes/Command/ExtensionApiCommandController.php +++ b/Classes/Command/ExtensionApiCommandController.php @@ -141,6 +141,7 @@ public function infoCommand($key) { } $this->logger->info('extensionApi:info executes successfully.'); + $this->quit(0); } /** @@ -173,6 +174,7 @@ public function listInstalledCommand($type = '') { $this->outputLine('%-2s%-40s', array(' ', str_repeat('-', $this->output->getMaximumLineLength() - 3))); $this->outputLine(' Total: ' . count($extensions) . ' extensions'); $this->logger->info('extensionApi:listInstalled executed successfully'); + $this->quit(0); } /** @@ -193,6 +195,7 @@ public function updateListCommand() { $this->outputLine($message); $this->logger->info($message); } + $this->quit(0); } /** @@ -216,6 +219,7 @@ public function installCommand($key) { $message = sprintf('Extension "%s" is now installed!', $key); $this->outputLine($message); $this->logger->info($message); + $this->quit(0); } /** @@ -238,6 +242,7 @@ public function uninstallCommand($key) { $message = sprintf('Extension "%s" is now uninstalled!', $key); $this->outputLine($message); $this->logger->info($message); + $this->quit(0); } /** @@ -300,6 +305,7 @@ public function configureCommand($key, $configFile = '', $settings = '') { $message = sprintf('Extension "%s" has been configured!', $key); $this->outputLine($message); $this->logger->info($message); + $this->quit(0); } /** @@ -319,6 +325,7 @@ public function fetchCommand($key, $version = '', $location = 'Local', $overwrit $message = sprintf('Extension "%s" version %s has been fetched from repository! Dependencies were not resolved.', $data['main']['extKey'], $data['main']['version']); $this->outputLine($message); $this->logger->info($message); + $this->quit(0); } catch (Exception $e) { $message = $e->getMessage(); $this->outputLine($message); @@ -347,6 +354,7 @@ public function listMirrorsCommand() { $this->quit(1); } $this->logger->info('extensionApi:listMirrors executed successfully.'); + $this->quit(0); } /** @@ -364,6 +372,7 @@ public function importCommand($file, $location = 'Local', $overwrite = FALSE) { $message = sprintf('Extension "%s" has been imported!', $data['extKey']); $this->outputLine($message); $this->logger->info($message); + $this->quit(0); } catch (Exception $e) { $this->outputLine($e->getMessage()); $this->logger->error($e->getMessage()); diff --git a/Classes/Command/ImportExportApiCommandController.php b/Classes/Command/ImportExportApiCommandController.php index 2fdfde5..1a93bd2 100755 --- a/Classes/Command/ImportExportApiCommandController.php +++ b/Classes/Command/ImportExportApiCommandController.php @@ -57,5 +57,6 @@ public function importCommand($pid, $fileName, $update = FALSE) { foreach ($messages AS $message) { $this->outputLine($message); } + $this->quit(0); } -} \ No newline at end of file +} diff --git a/Classes/Command/SiteApiCommandController.php b/Classes/Command/SiteApiCommandController.php index 74e6b72..ee4358c 100644 --- a/Classes/Command/SiteApiCommandController.php +++ b/Classes/Command/SiteApiCommandController.php @@ -94,6 +94,7 @@ public function infoCommand() { } $this->logger->info('siteApi:info executes successfully.'); + $this->quit(0); } /** @@ -120,5 +121,6 @@ public function createSysNewsCommand($header, $text = '') { $this->outputLine('News entry NOT created.'); $this->quit(1); } + $this->quit(0); } }