Skip to content

Conversation

@achingbrain
Copy link
Member

When debugging issues with code imported from .aegir.js files, it's almost impossible to know where the error is coming from without seeing the whole stack trace so print the whole thing if a command fails.

When debugging issues with code imported from `.aegir.js` files, it's
almost impossible to know where the error is coming from without
seeing the whole stack trace so print the whole thing if a command fails.
src/index.js Outdated
Comment on lines 103 to 106
if (res.parsed && res.parsed.argv.debug) {
console.error('\n', err)
} else {
console.error(err.message)
console.error(err)
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
if (res.parsed && res.parsed.argv.debug) {
console.error('\n', err)
} else {
console.error(err.message)
console.error(err)
if (res.parsed && (res.parsed.argv.debug || process.env.DEBUG != null)) {
console.error('\n', err)
} else {
console.error(err.message)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants