-
Notifications
You must be signed in to change notification settings - Fork 12k
ng new ignores --collection for checking schematic options #23414
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
Comments
@jaschwartzkopf, your investigation looks good. Want to try to land a PR? |
Previously, this option was ignored due to an incorrect deconstruction. Closes angular#23414
Previously, this option was ignored due to an incorrect deconstruction. Closes #23414
Hi, @alan-agius4. This is now working, thank you for the fix! Still I think there is similar problem with the "ng g @custom-schematics:schematic-name --custom-schematic-property=value" is throwing Error: Unknown arguments: custom-schematic-property |
@Lipata, that seems to be an unrelated issued. Please open a new issue with a minimal reproduction. 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
Command (mark with an
x
)Is this a regression?
Yes, before you could use --collection to run a custom schematic for ng new.
Description
The schematic in --collection is ran, but options are based on @schematics/angular:ng-new instead of --colleciton.
The issue is how collectionNameFromArgs is extracted from the options:
https://github.com/angular/angular-cli/blob/main/packages/angular/cli/src/commands/new/cli.ts#L48
If this line is changed to:
The options from --collection are used correctly.
🔬 Minimal Reproduction
Try to use ng new --collection with a collection that has arguments not in @schematics/angular:ng-new
🔥 Exception or Error
Only options for @shematics/angular:ng-new are recognized.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: