Skip to content

Commit

Permalink
Fallback to info logs when error occurs but no errors are present in …
Browse files Browse the repository at this point in the history
…logs.
  • Loading branch information
AdamVyborny committed Oct 12, 2023
1 parent 489890c commit 4a6a7ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Service/DbtService.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public function runCommand(string $command, string $target = 'kbc_prod'): string
throw new UserException($e->getProcess()->getErrorOutput());
}
$logs = iterator_to_array(ParseDbtOutputHelper::getMessagesFromOutput($output, 'error'));
if (empty($logs)) {
$logs = iterator_to_array(ParseDbtOutputHelper::getMessagesFromOutput($output));
}
throw new UserException(implode(PHP_EOL, $logs));
}
}
Expand Down

0 comments on commit 4a6a7ed

Please sign in to comment.