Repository navigation
Commit 2897d3a
committed
fix(@angular/cli): allow command arguments named
Previously, `localYargs.help('help', ...)` was always enabled regardless of whether `--help` was passed. In Yargs, enabling `.help()` also registers an implicit `help` command/positional trigger, causing commands with a positional argument named `help` (such as `ng generate component help`) to display the CLI help output instead of executing the command.
Only enable Yargs help handling when `--help` is present in the parsed options.
Fixes #25705help
1 parent 88b43b9 commit 2897d3a
2 files changed
Lines changed: 15 additions & 14 deletions
File tree
- packages/angular/cli/src/command-builder
- tests/e2e/tests/generate/component
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
16 | 14 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
0 commit comments