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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng add options, other than --help, are not supported #13479

Closed
timsitzer opened this issue Jan 19, 2019 · 1 comment · Fixed by #13522
Closed

ng add options, other than --help, are not supported #13479

timsitzer opened this issue Jan 19, 2019 · 1 comment · Fixed by #13522
Assignees
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely type: bug/fix
Milestone

Comments

@timsitzer
Copy link

timsitzer commented Jan 19, 2019

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

No

Description

The ng add command does not support listed options, other than '--help'.

V6 of the CLI didn't support any options, beyond help, with add. After a little investigation into the code, it appears the add.json schema was updated to utilize the schematic definitions from definitions.json but it doesn't appear that add-impl.ts was fully updated to support them.

From what I can tell, with my limited exploration into the code, add-impl.ts has hard-coded values for dryRun and force within the defined "runOptions" object. I am currently unaware of a package that utilizes interactive prompts so I could not validate if the defaults or interactive options are working or not but I do not see any additional interrogation of options object to look for them either.

🔬 Minimal Reproduction

ng new my-app --defaults
cd my-app
ng add --help
ng add @angular/pwa --dry-run

Since this package performs modifications, I would have expected to see a listing of those changes with the typical "dryRun" message.

🔥 Exception or Error





🌍 Your Environment




Angular CLI: 7.2.2
Node: 10.15.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.12.2
@angular-devkit/core         7.2.2
@angular-devkit/schematics   7.2.2
@schematics/angular          7.2.2
@schematics/update           0.12.2
rxjs                         6.3.3
typescript                   3.2.2

Anything else relevant?

@mgechev mgechev added the needs: discussion On the agenda for team meeting to determine next steps label Jan 19, 2019
@alan-agius4 alan-agius4 removed the needs: discussion On the agenda for team meeting to determine next steps label Jan 25, 2019
@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely area: @angular/cli labels Jan 27, 2019
@ngbot ngbot bot added this to the needsTriage milestone Jan 27, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants