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

bug: version flag doesn't care about other arguments #1412

Closed
snitin315 opened this issue Apr 3, 2020 · 9 comments · Fixed by #1462
Closed

bug: version flag doesn't care about other arguments #1412

snitin315 opened this issue Apr 3, 2020 · 9 comments · Fixed by #1462
Labels

Comments

@snitin315
Copy link
Member

Describe the bug

version flag doesn't care about other arguments supplied at the same time.

What is the current behavior?

Screenshot from 2020-04-03 07-44-58

To Reproduce
Steps to reproduce the behavior:

webpack --version --abc

Expected behavior

Should throw a warning fo invalid args.

Please paste the results of webpack-cli info here, and mention other relevant information

Additional context

Looking into it. Open for discussion

@alexander-akait
Copy link
Member

alexander-akait commented Apr 3, 2020

Should output an error like do other cli (exit code - 2), for example eslint do:

Invalid option '--abc'.

@snitin315
Copy link
Member Author

Sounds good. I will work on it.

@rishabh3112
Copy link
Member

Same is the case with --help flag, take on both of them together.

@anshumanv
Copy link
Member

What happens in case of multiple commands? Which takes precedence?

@snitin315
Copy link
Member Author

@anshumanv Can you provide some examples?

@anshumanv
Copy link
Member

webpack-cli version init or webpack-cli init version

@snitin315
Copy link
Member Author

snitin315 commented Apr 4, 2020

It should output the version of init as well. #1363

@anshumanv
Copy link
Member

Yep that would be good 👍

@aman29271
Copy link
Contributor

I think json flag also doesn't care about any other flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants