Skip to content

Commit

Permalink
Update lib/cli/run.js
Browse files Browse the repository at this point in the history
Co-authored-by: Pelle Wessman <pelle@kodfabrik.se>
  • Loading branch information
stalet and voxpelli committed Jan 22, 2024
1 parent 77934c1 commit 25bda25
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,12 @@ exports.handler = async function (argv) {
try {
await runMocha(mocha, argv);
} catch (err) {
console.error('\n' + (err.stack || `Error: ${err && err.message}`), err);
if (!err) {
console.error('\n Undefined error:`, err);
} else {
console.error('\n' + (err.stack || `Error: ${err.message}`), err);
}

process.exit(1);
}
};

0 comments on commit 25bda25

Please sign in to comment.