Skip to content

Commit

Permalink
fix(bin): catches errors when getting silent option
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 26, 2019
1 parent f0ac3ea commit 856c793
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/kpo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { OpenError } from '~/utils/errors';
main(process.argv.slice(2)).catch(async (err) => {
const isOpen = err instanceof OpenError;

return error(isOpen ? err.root : err, {
exit: (await core.get('silent')) ? 0 : 1,
return error(err, {
exit: (await core.get('silent').catch(() => false)) ? 0 : 1,
debug: true,
logger: {
error: logger.error,
Expand Down

0 comments on commit 856c793

Please sign in to comment.