Skip to content

Conversation

alan-agius4
Copy link
Collaborator

When using 'ng new' with the interactive AI tool prompt, the 'none' option remains selected even after a user selects another tool. This results in a validation error because the schematic receives an array with both 'none' and the selected tool.

This fix filters out the 'none' value from the tool option if any other tool is also present, allowing the schematic to proceed.

Closes: #30987

@alan-agius4 alan-agius4 requested a review from clydin August 25, 2025 13:16
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Aug 25, 2025
@alan-agius4 alan-agius4 marked this pull request as ready for review August 25, 2025 13:18
…en 'none' and other AI tools are selected

When using 'ng new' with the interactive AI tool prompt, the 'none' option remains selected even after a user selects another tool. This results in a validation error because the schematic receives an array with both 'none' and the selected tool.

This fix filters out the 'none' value from the `tool` option if any other tool is also present, allowing the schematic to proceed.

Closes: angular#30987
Previously, default array values were being incorrectly treated as strings.
Previously, default array values were being incorrectly treated as strings.
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 26, 2025
@alan-agius4 alan-agius4 merged commit aed26c3 into angular:main Aug 26, 2025
53 of 55 checks passed
@alan-agius4 alan-agius4 deleted the none-value branch August 26, 2025 14:26
@alan-agius4
Copy link
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @angular/cli area: @angular-devkit/schematics-cli area: @schematics/angular target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng new fails when 'none' selected for AI best practices
2 participants