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
project wrongly in required flags in some schematics #13010
Comments
Hi, the At the moment, when no project is provided and you use the schematics via the
If you try to run the schematics directly without
Looping in @hansl as he is more aware of this, but look to me that this is working as expected. |
@alan-agius4 Thanks for your answer. I'm not aware of the raw Then, do you confirm |
@cyrilletuzi, AFAIK this is the indented behaviour as in some cases when no Project is provided we throw an error, such as https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/component/index.ts#L131 That said, I am not sure why |
@alan-agius4 Thanks for the answer. As a feedback for other tools maintainers, I discovered a similar problem with other options like So I'll filtered required options if they have Thanks again for your quick answer. |
I think the issue is wider than expected and not resolved. For example, @alan-agius4 Is it the expected behavior? |
@cyrilletuzi, that seems like a genuine bug. @hansl should properties that have a |
Hi, any news about this issue? Thanks. |
There’s an open PR for address this. |
…from required At the moment, these would end up being required to be passed even though a default is provided. Fixes #13010
…from required At the moment, these would end up being required to be passed even though a default is provided. Fixes #13010
@alan-agius4 I don't know why, but this issue stays in my Github opened issues list. Surely a Github bug, but could you please reopen and close this issue to try to clean this? |
Seems my comment triggered something, all is OK now, thanks. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
CLI v7.0.6
The log given by the failure
#12196 wrongly added
project
as a required flag inclass
,guard
andservice-worker
schematics JSON schemas.It creates wrong behavior in tools using schematics, which check the required flags to ask the user, like cyrilletuzi/vscode-angular-schematics#20.
Desired functionality
project
should be removed fromrequired
in schematics JSON schemas, as it's only an option (the CLI defaults to the main project).The text was updated successfully, but these errors were encountered: