Skip to content

Commit

Permalink
debug:unassigned now returns exit status 2 when the command ran succe…
Browse files Browse the repository at this point in the history
…ssfully, but there were some unassigned tokens. This is useful for CI.
  • Loading branch information
patrickkusebauch committed Mar 11, 2024
1 parent e005363 commit 92fd748
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Supportive/Console/Command/DebugUnassignedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int

try {
$result = $this->runner->run($symfonyOutput);

return $result ? self::EXIT_WITH_UNASSIGNED_TOKENS : self::SUCCESS;
} catch (CommandRunException $exception) {
$outputStyle->error($exception->getMessage());

return self::FAILURE;
}

}
}
2 changes: 2 additions & 0 deletions src/Supportive/Console/Command/DebugUnassignedRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ final class DebugUnassignedRunner
public function __construct(private readonly UnassignedTokenAnalyser $analyser) {}

/**
* @return bool are there any unassigned tokens?
*
* @throws CommandRunException
*
* @return bool are there any unassigned tokens?
Expand Down

0 comments on commit 92fd748

Please sign in to comment.