Webpack-cli: bug: version flag doesn't care about other arguments

Created on 3 Apr 2020  路  9Comments  路  Source: webpack/webpack-cli

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

Bug

Most helpful comment

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

All 9 comments

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

Invalid option '--abc'.

Sounds good. I will work on it.

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

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

@anshumanv Can you provide some examples?

webpack-cli version init or webpack-cli init version

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

Yep that would be good 馃憤

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

Was this page helpful?
0 / 5 - 0 ratings