Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed --stack option to always print stack traces for errors #864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/grunt/cli.js
Expand Up @@ -63,10 +63,6 @@ var optlist = cli.optlist = {
info: 'Enable debugging mode for tasks that support it.',
type: Number
},
stack: {
info: 'Print a stack trace when exiting with a warning or fatal error.',
type: Boolean
},
force: {
short: 'f',
info: 'A way to force your way past warnings. Want a suggestion? Don\'t use this option, fix your code.',
Expand Down
11 changes: 4 additions & 7 deletions lib/grunt/fail.js
Expand Up @@ -39,14 +39,11 @@ function writeln(e, mode) {
grunt.log.writeln(msg);
}

// If --stack is enabled, log the appropriate error stack (if it exists).
function dumpStack(e) {
if (grunt.option('stack')) {
if (e.origError && e.origError.stack) {
console.log(e.origError.stack);
} else if (e.stack) {
console.log(e.stack);
}
if (e.origError && e.origError.stack) {
console.log(e.origError.stack);
} else if (e.stack) {
console.log(e.stack);
}
}

Expand Down