Skip to content

ng new does not show help from custom schematic #13681

@vakrilov

Description

@vakrilov

🐞 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/[email protected] 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions