Skip to content

Commit

Permalink
fix: exit with error instead of return
Browse files Browse the repository at this point in the history
  • Loading branch information
ComradeVanti committed Jul 5, 2024
1 parent 680ba54 commit c325881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cli/error-logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ export function withErrorLogger<
>(
log: Logger,
cmd: (...args: TArgs) => Promise<TOut>
): (...args: TArgs) => Promise<TOut | ResultCodes.Error> {
): (...args: TArgs) => Promise<TOut> {
return (...args) =>
cmd(...args).catch((error) => {
logError(log, error);
return ResultCodes.Error;
process.exit(ResultCodes.Error);
});
}

0 comments on commit c325881

Please sign in to comment.