Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

`ng new` does not show help from custom schematic #13681

Closed
vakrilov opened this issue Feb 15, 2019 · 2 comments

Comments

@vakrilov
Copy link
Contributor

commented Feb 15, 2019

馃悶 Bug report

Command (mark with an x)

- [x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: `6.1.3`

Description

When executing:

ng new -c=<custom-collection> --help

The help displayed is not the help from the ng-new schematic in the custom collection. The help from @schematics/angular is displayed instead.

馃敩 Minimal Reproduction

I have reproduced it with @nativescript/schematis package:

npm i -g @nativescript/schematics
ng new -c=@nativescript/schematics --help

Expected: Print the help for @nativescript/schematics ng-new
Actual: Print the help for @schematics/angular
Note: Using @angular/cli@6.1.3 prints the correct help

馃實 Your Environment


Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.13.1
@angular-devkit/core         7.3.1
@angular-devkit/schematics   7.3.1
@schematics/angular          7.3.1
@schematics/update           0.13.1
rxjs                         6.3.3
typescript                   3.2.4

Anything else relevant?
Debugging the issue led me to this place in the angular cli code. schematicName is defaulted to ng-new when executing ng new. However, the options.collection(if such option is provided) should used to load the collection schema and description.

Issue was reported here also: NativeScript/nativescript-schematics#157

@cexbrayat

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

@alan-agius4 Looks like this is no longer an issue. You probably fixed it with #14530 right?

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

commented Jun 18, 2019

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can鈥檛 perform that action at this time.