From 7feb738b33b4a5ab0601962a355ed7337889c050 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sat, 28 May 2016 11:21:55 -0700 Subject: [PATCH] now-alias: support `userError` errors --- bin/now-alias | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/now-alias b/bin/now-alias index 50def67..9ec1da1 100755 --- a/bin/now-alias +++ b/bin/now-alias @@ -83,7 +83,11 @@ if (argv.help || !subcommand) { try { await run(token); } catch (err) { - error(`Unknown error: ${err.stack}`); + if (err.userError) { + error(err.message); + } else { + error(`Unknown error: ${err.stack}`); + } exit(1); } })