diff --git a/Neos.Media/Classes/Command/MediaCommandController.php b/Neos.Media/Classes/Command/MediaCommandController.php index 1e67d39031b..af108accbdc 100644 --- a/Neos.Media/Classes/Command/MediaCommandController.php +++ b/Neos.Media/Classes/Command/MediaCommandController.php @@ -282,7 +282,7 @@ public function removeUnusedCommand(string $assetSource = '', bool $quiet = fals if ($unusedAssetCount === 0) { !$quiet && $this->output->outputLine(PHP_EOL . 'No unused assets found.'); - exit; + $this->quit(1); } foreach ($tableRowsByAssetSource as $assetSourceIdentifier => $tableRows) { @@ -298,7 +298,7 @@ public function removeUnusedCommand(string $assetSource = '', bool $quiet = fals if ($assumeYes === false) { if (!$this->output->askConfirmation(sprintf('Do you want to remove %s unused assets?', $unusedAssetCount))) { - exit; + $this->quit(1); } }