Skip to content

Conversation

@alan-agius4
Copy link
Collaborator

Removes the FileAlreadyExistException check within the create method of HostTree. This change allows a schematic to create a file even if one already exists at the same path, effectively overwriting it.

This provides more flexibility for schematic authors, particularly in scenarios where files need to be replaced or updated unconditionally. It is intended to be used with schematics that have a force or overwrite option.

Closes #30578

…tic contains `host.create`

Removes the `FileAlreadyExistException` check within the `create` method of `HostTree`. This change allows a schematic to create a file even if one already exists at the same path, effectively overwriting it.

This provides more flexibility for schematic authors, particularly in scenarios where files need to be replaced or updated unconditionally. It is intended to be used with schematics that have a `force` or `overwrite` option.

Closes angular#30578
@alan-agius4 alan-agius4 requested a review from clydin October 21, 2025 15:18
@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 Oct 21, 2025
@alan-agius4 alan-agius4 force-pushed the schematics-force-override branch from 90d3477 to c58a2d1 Compare October 21, 2025 15:31
@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 Oct 21, 2025
@alan-agius4 alan-agius4 force-pushed the schematics-force-override branch from c58a2d1 to 90d3477 Compare October 21, 2025 15:37
@alan-agius4 alan-agius4 merged commit 18bf8e7 into angular:main Oct 21, 2025
44 of 62 checks passed
@alan-agius4 alan-agius4 deleted the schematics-force-override branch October 21, 2025 15:53
@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-devkit/schematics target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(theme-color): Generator theme-color flags --force and --defaults do nothing

2 participants