Skip to content

Commit

Permalink
feat(bin): ensures param is an Error before logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 26, 2019
1 parent c9b3a1c commit 5985ff9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bin/kpo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import core from '~/core';
import { error } from 'cli-belt';
import logger from '~/utils/logger';
import { OpenError } from '~/utils/errors';
import { ensure } from 'errorish';

main(process.argv.slice(2)).catch(async (err) => {
err = ensure(err);
const isOpen = err instanceof OpenError;

return error(err, {
Expand Down

0 comments on commit 5985ff9

Please sign in to comment.