Skip to content

Commit 9a4825d

Browse files
Don't double exception output
1 parent 3541bb0 commit 9a4825d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Runner/Hook.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ protected function runHook(): void
176176
{
177177
$hookConfig = $this->config->getHookConfigToExecute($this->hook);
178178
$actions = $hookConfig->getActions();
179-
// are any actions configured
179+
// are any actions configured?
180180
if (count($actions) === 0) {
181181
$this->io->write(' - no actions to execute');
182182
} else {
@@ -310,10 +310,10 @@ private function handleAction(Config\Action $action): void
310310
} catch (Exception $e) {
311311
$status = ActionLog::ACTION_FAILED;
312312
$this->printer->actionFailed($action);
313-
$io->write('<fg=yellow>' . $e->getMessage() . '</>');
314313
if (!$action->isFailureAllowed($this->config->isFailureAllowed())) {
315314
throw $e;
316315
}
316+
$io->write('<fg=yellow>' . $e->getMessage() . '</>');
317317
} finally {
318318
$this->hookLog->addActionLog(new ActionLog($action, $status, $io->getMessages()));
319319
$this->afterAction($action);

0 commit comments

Comments
 (0)