ng add options, other than --help, are not supported #13479
Labels
area: @angular/cli
freq1: low
Only reported by a handful of users who observe it rarely
type: bug/fix
Milestone
🐞 Bug report
Command (mark with an
x
)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
Anything else relevant?
The text was updated successfully, but these errors were encountered: