Skip to content

[cli]: show help when invalid flag is supplied#1051

Merged
ematipico merged 2 commits intowebpack:nextfrom
anshumanv:1046
Feb 10, 2020
Merged

[cli]: show help when invalid flag is supplied#1051
ematipico merged 2 commits intowebpack:nextfrom
anshumanv:1046

Conversation

@anshumanv
Copy link
Copy Markdown
Member

Fixes #1046

What kind of change does this PR introduce?
intercept flag parsing and if any invalid flag is present, print a neat err.

Did you add tests for your changes?
Will add

If relevant, did you update the documentation?
NA

Summary

  • Output pretty message when invalid flag is supplied.

Does this PR introduce a breaking change?
No

Other information

@anshumanv anshumanv requested a review from a team as a code owner August 19, 2019 15:30
@anshumanv
Copy link
Copy Markdown
Member Author

Looks like this atm -

image

@anshumanv
Copy link
Copy Markdown
Member Author

debugging

Copy link
Copy Markdown
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

I think we need to chill this until a fix for #1050 (fixing dupe args) is landed, because it will most likely impact this PR.

@anshumanv
Copy link
Copy Markdown
Member Author

Sounds good even!

Copy link
Copy Markdown
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

Okay this could be resumed now, UNKNOWN_VALUE L41 in bootstrap needs modification

@anshumanv
Copy link
Copy Markdown
Member Author

Will get back on this in a bit. 👍

@anshumanv
Copy link
Copy Markdown
Member Author

We already have an unknown flag log when the flag is supplied, are there any other requirements/enhancements that we can do to it? @evenstensberg @ematipico

@ematipico
Copy link
Copy Markdown
Contributor

Hi @anshumanv sorry to coming back to you so late, I completely missed this PR!

About the message provided, could you print webpack --help instead? If you rebased your PR, I would be happy to review it and merge it!

@anshumanv
Copy link
Copy Markdown
Member Author

Hey Emanuale,

About the message provided, could you print webpack --help instead

Def sounds better to be, will rebase and change it in a while 👍

handle invalid flags and show help in case invalid flag is supplied

ISSUES CLOSED: webpack#1046
cleanup custom logic to determine invalid flags

ISSUES CLOSED: webpack#1046
@anshumanv anshumanv changed the title [cli]: pretty err when invalid flag is supplied [cli]: show help when invalid flag is supplied Feb 6, 2020
@webpack-bot
Copy link
Copy Markdown

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@ematipico
Copy link
Copy Markdown
Contributor

Thank you!

@ematipico ematipico merged commit 6663e94 into webpack:next Feb 10, 2020
@anshumanv anshumanv deleted the 1046 branch February 10, 2020 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT]: Prettify err in case the supplied flag(s) is/are unknown

5 participants