-
-
Notifications
You must be signed in to change notification settings - Fork 621
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
fix(cli): show help flag when defaults fail #466
Merged
evenstensberg
merged 11 commits into
webpack:next
from
sumit-gupta91:bugfix/error-message
Jun 2, 2018
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2c9db31
fixed test cases
sumit-gupta91 4b50c34
remove unwanted console
sumit-gupta91 3c6a631
fix(254) - addressed PR comments
sumit-gupta91 0a89eb6
fix(254) - added requested changes at right place
sumit-gupta91 904e527
fix(254) - exit after error
sumit-gupta91 5c9fe7c
fix: require chalk
sumit-gupta91 bac9c01
refactor - addressed PR comments
sumit-gupta91 c604d3e
refactor - addressed PR comments
sumit-gupta91 1bc3318
refactor : remove unwanted keywords
sumit-gupta91 94579b7
chore(review): format
evenstensberg 26d7f8c
Merge branch 'next' into bugfix/error-message
evenstensberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
MIT License http://www.opensource.org/licenses/mit-license.php | ||
Author Tobias Koppers @sokra | ||
*/ | ||
const chalk = require("chalk"); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to trim here |
||
(function() { | ||
// wrap in IIFE to be able to use return | ||
|
@@ -501,8 +502,8 @@ For more information, see https://webpack.js.org/api/cli/.`); | |
if (errors[0].name === "EntryModuleNotFoundError") { | ||
stdout.write("\n" + chalk.red(errors[0].error.toString()) + "\n"); | ||
stdout.write( | ||
"\n" + " ERROR Insufficient number of arguments provided " + | ||
"\n" + " INFO Alternatively, run `webpack(-cli) --help` for usage info." + | ||
"\n" + chalk.blue("ERROR ") + "Insufficient number of arguments provided " + | ||
"\n" + chalk.blue("INFO ") + "Alternatively, run `webpack(-cli) --help` for usage info." + | ||
"\n\n" | ||
); | ||
process.exit(0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should exit the process now as we've got no styling |
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't have chalk here. Leave it unstyled for now