Commit 18bf8e7
committed
fix(@angular-devkit/schematics): respect
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--force option when schematic contains host.create
1 parent f371b52 commit 18bf8e7
File tree
2 files changed
+52
-6
lines changed- packages/angular_devkit/schematics/src/tree
- tests/legacy-cli/e2e/tests/generate
2 files changed
+52
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
407 | 406 | | |
408 | 407 | | |
409 | 408 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | 409 | | |
415 | | - | |
| 410 | + | |
416 | 411 | | |
417 | 412 | | |
418 | 413 | | |
| |||
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments