Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ exports.main = (argv = process.argv.slice(2), mochaArgs) => {
debug('caught error sometime before command handler: %O', err);
yargs.showHelp();
console.error(`\n${symbols.error} ${pc.red('ERROR:')} ${msg}`);
console.error(err);
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider logging the error stack (e.g., console.error(err.stack || err)) instead of the error object itself to provide full context for debugging.

Suggested change
console.error(err);
console.error(err.stack || err);

Copilot uses AI. Check for mistakes.
process.exit(1);
})
.help('help', 'Show usage information & exit')
Expand Down