Skip to content

fix(@angular/cli): support string | boolean union types in CLI options#31821

Closed
clydin wants to merge 1 commit intoangular:mainfrom
clydin:cli/support-boolean-string-options
Closed

fix(@angular/cli): support string | boolean union types in CLI options#31821
clydin wants to merge 1 commit intoangular:mainfrom
clydin:cli/support-boolean-string-options

Conversation

@clydin
Copy link
Member

@clydin clydin commented Nov 14, 2025

This commit enhances the CLI's command builder to correctly handle JSON schema properties that define a union type of string and boolean. Previously, only the first type in a union was considered, preventing options like --runner-config from being used as both a boolean flag and a string value.

This commit enhances the CLI's command builder to correctly handle JSON schema
properties that define a union type of `string` and `boolean`. Previously,
only the first type in a union was considered, preventing options like
`--runner-config` from being used as both a boolean flag and a string value.
@clydin clydin marked this pull request as ready for review November 14, 2025 20:53
@alan-agius4
Copy link
Collaborator

Will false in the following case —option=false be parsed as a Boolean or string?

would be great to add a couple of unit tests.

@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 14, 2025
@clydin clydin closed this Nov 18, 2025
@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 Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews area: @angular/cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants