-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Sets the optional parameters of the option #1328
Comments
(Assuming you are talking about the example in the README...) The example works fine with a required value of program
.option('-c, --cheese <type>', 'add the specified type of cheese', 'blue'); https://github.com/tj/commander.js/blob/master/examples/options-defaults.js |
I'm sorry That I didn't fully understand the role of There is nothing wrong with this program. It may be that my requirements are related to the optional parameters that cause unnecessary errors I think when I use this option I can pass no arguments and use the default values Excuse me. Have a nice day |
This option has a required value:
This option has an optional value, it can be used just as a boolean flag or with a value:
|
Closing this as resolved. Feel free to open a new issue if it comes up again, with new information and renewed interest. |
Set the default value. The required parameter should be changed to [Type]
The text was updated successfully, but these errors were encountered: