From d910d2a34ccf377b0035eb3a73cc293b77705260 Mon Sep 17 00:00:00 2001 From: Gabi Dobocan Date: Thu, 11 May 2023 00:50:16 +0300 Subject: [PATCH] feat: include stack details in error logging --- src/cli/cmds/audit.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cli/cmds/audit.js b/src/cli/cmds/audit.js index dc98f02..8b9c457 100644 --- a/src/cli/cmds/audit.js +++ b/src/cli/cmds/audit.js @@ -342,7 +342,9 @@ exports.handler = async (argv) => { logger.log('✨ Done'); } else { logger.log('✨ Done, but with errors:'); - errors.forEach((error) => logger.logColor(logger.colors.RED, `❌ ${error}`)); + errors.forEach((error) => { + logger.logColor(logger.colors.RED, `❌ ${error.stack || error}`); + }); logger.logColor(logger.colors.RED, '❌ Failing because of errors'); process.exit(1); }