-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Providing both an --option and a --no-option variant causes the option to always be boolean. #34
Comments
🎉 This issue has been resolved in version 6.3.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@egoist I'm not sure if b1fbe18 fixes the whole thing. Looking at vuepress for a second, we have this block of code defining the cli... (take note of the https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/cli/index.js#L40-L48 ... and then we use it here... The usage of the
If I've understood the changes in the commit correctly, what we get now is this:
I'm not sure if the usage is incorrect or if this package isn't quite doing things right yet. |
I guess you're right |
🎉 This issue has been resolved in version 6.3.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hopefully it's fixed now. However seems there's another issue with the usage in VuePress: Since you used Maybe you should use the cli.command('foo', 'desc', { ignoreOptionDefaultValue: true }) /cc @ulivz |
That should be okay, because I think we do look at I dunno, probably need ulivz to look at the logic here and figure out if the command line options and the logic here still matches up. |
@spiltcoffee well at least this is the same in commander.js |
Cool~ ❤️ |
Providing both an --option and a --no-option variant causes the option to always be boolean.
This means even if --option takes in a [value] or , since --no-option is defined, it will only ever be true or false, and specifying a value causes it to be interpreted as an argument instead.
Example repo: https://github.com/spiltcoffee/cac-no-example
The text was updated successfully, but these errors were encountered: