From 5985ff9fbe395ffa26e11c55490c1a274c60897b Mon Sep 17 00:00:00 2001 From: Rafa Mel Date: Sat, 27 Apr 2019 01:09:30 +0200 Subject: [PATCH] feat(bin): ensures param is an Error before logging --- src/bin/kpo.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/kpo.ts b/src/bin/kpo.ts index 9a42d57..57206a9 100644 --- a/src/bin/kpo.ts +++ b/src/bin/kpo.ts @@ -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, {