Skip to content

Commit

Permalink
FEATURE: reworked exit condition
Browse files Browse the repository at this point in the history
* changed from 'exit' to '$this->quit(1)' in removeUnusedCommand

ISSUE: neos#3086
  • Loading branch information
Jan3k3y committed Mar 6, 2023
1 parent 87fba84 commit eaab274
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Neos.Media/Classes/Command/MediaCommandController.php
Expand Up @@ -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) {
Expand All @@ -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 <b>%s</b> unused assets?', $unusedAssetCount))) {
exit;
$this->quit(1);
}
}

Expand Down

0 comments on commit eaab274

Please sign in to comment.