diff --git a/bin/eslint.js b/bin/eslint.js index 7c05ad3b6e6..10a7f73dae1 100755 --- a/bin/eslint.js +++ b/bin/eslint.js @@ -47,6 +47,8 @@ process.once("uncaughtException", err => { console.error("\nOops! Something went wrong! :("); console.error(`\n${template(err.messageData || {})}`); } else { + + console.error(err.message); console.error(err.stack); } diff --git a/tests/bin/eslint.js b/tests/bin/eslint.js index 0774500f0a8..982df254b95 100644 --- a/tests/bin/eslint.js +++ b/tests/bin/eslint.js @@ -271,9 +271,6 @@ describe("bin/eslint.js", () => { assert.strictEqual(output.stdout, ""); assert.include(output.stderr, expectedSubstring); - - // The message should appear exactly once in stderr - assert.strictEqual(output.stderr.indexOf(expectedSubstring), output.stderr.lastIndexOf(expectedSubstring)); }); return Promise.all([exitCodeAssertion, outputAssertion]);