Repository navigation
fix(@angular/cli): allow command arguments named help - #34609
Open
alan-agius4 wants to merge 1 commit into
Open
alan-agius4 wants to merge 1 commit into
alan-agius4 wants to merge 1 commit into
Conversation
5 of 15 tasks
There was a problem hiding this comment.
Code Review
This pull request refactors an end-to-end test to use async/await syntax and adds a test case for generating a component named "help". It also updates the command runner to conditionally configure the help option. Feedback is provided regarding the Yargs .help() configuration, noting that passing a boolean as the first argument causes the custom description to be ignored, and suggests a TypeScript-safe alternative to preserve the description.
alan-agius4
force-pushed
the
fix/help-positional-argument
branch
from
October 30, 2026 14:35
2897d3a to
2f0875d
Compare
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 angular#25705
alan-agius4
force-pushed
the
fix/help-positional-argument
branch
from
October 30, 2026 14:38
2f0875d to
f48282a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously,
localYargs.help('help', ...)was always enabled regardless of whether--helpwas passed. In Yargs, enabling.help()also registers an implicithelpcommand/positional trigger, causing commands with a positional argument namedhelp(such asng generate component help) to display the CLI help output instead of executing the command.Only enable Yargs help handling when
--helpis present in the parsed options.Fixes #25705