-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
Help weirdness #364
Comments
OK, the first item seems to be fixed by this recent commit: 4c21283 I'm using version 0.13.4, which doesn't include this commit - so that explains that. |
The issue with the required attribute and help seems to be a bit of a chicken/egg issue. The problems is caused by the fact that the If we add a check for the help option before defining the required parameters, we can print the help message, but it won't include the required parameters, since they haven't been defined yet. The clean way to fix this would be to split up the definition of the parameters and then check for the required parameters later:
|
Hi, this have been fixed in this commit: 4c21283 It should be published with the next yeoman-generator release. Stay tune. |
I've noticed a couple of weird things with the
--help
option:--help
option for a generator, the help message always shows the help for theinit
command. Example:yo generator --help
showsyeoman init [options]
, whereas I would expect something likeyo generator [options]
.--help
option for a sub-generator that expects a name parameter (extendingNamedBase
) always throws an error due to the missing required parameter. Example:yo generator:subgenerator --help
gives the following error:This is rather unexpected. When using the
--help
option, I shouldn't need to know that I need to provide a required argument.yo generator:subgenerator --help foo
works fine, but I find it rather unnecessary that I need to provide the dummyfoo
argument just to find out the expected arguments and options. Usability would be a lot better if I wouldn't have to know about required parameters if I'm just calling help.Does that make sense?
The text was updated successfully, but these errors were encountered: