-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugCommander is not working as intendedCommander is not working as intended
Description
Current Behavior -
If we define an option whose name contains no- for e.g. module-no-parse, it makes the option true by default.
Expected Behavior -
It is supposed to do this only for flags with leading no- as mentioned in docs. https://github.com/tj/commander.js/#other-option-types-negatable-boolean-and-flagvalue
You can specify a boolean option long name with a leading no- to set the option value to false when used. Defined alone this also makes the option true by default.
Steps to reproduce -
Define an option whose name includes no- e.g. module-no-parse.
Check its default value in the parser.

Addition Info
Bug found via webpack/webpack-cli#1679
Metadata
Metadata
Assignees
Labels
bugCommander is not working as intendedCommander is not working as intended