-
-
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
Inconsistent behavior when defining sub-command #256
Comments
Closing due to possible answer suggested and no response registered. Feel free to comment and we can re-open in case this issue persisted. |
I don't understand why you closed this: my "possible answer" involved patching commander.js, so it's not a workaround. |
I'm sorry! I was mistaken. |
I am looking forward to PR. |
Move the setting of executables to true from the command method’s handling of its undocumented desc parameter to the description method.
(Note: my original comment had one incorrect detail: the setting of |
Move the setting of executables to true from the command method’s handling of its undocumented desc parameter to the description method.
After finding a test failure and studying the code some more, I see that actually the problem is with my reading of the current documentation. Closing. |
The documented API for defining a sub-command is:
This does not automatically call
addImplicitHelpCommand
. The undocumented formdoes. It would seem reasonable to move the code that sets the
executables
flag, which in turn causesaddImplicitHelpCommand
to be called, from theparse
method into thedescription
method. Would a patch to do this be acceptable?The text was updated successfully, but these errors were encountered: