fix(@angular-devkit/schematics): Fix merge that causes an overwrite #19878
+43
−3
Conversation
| @@ -180,7 +180,7 @@ export class HostTree implements Tree { | |||
| case 'c': { | |||
| const { path, content } = action; | |||
|
|
|||
| if ((this._willCreate(path) || this._willOverwrite(path))) { | |||
| if ((this._willCreate(path) || this._willOverwrite(path) || this.exists(path))) { | |||
Brocco
Jan 26, 2021
Author
Contributor
This new check determines if the file already exists versus being created or overwritten.
This new check determines if the file already exists versus being created or overwritten.
694e312
to
b10d482
|
Looks like at least one E2E test is failing as well. |
0f39a57
to
df6dd97
8bf63b6
to
21f15fc
tests/legacy-cli/e2e/tests/generate/component/component-duplicate.ts
Outdated
Show resolved
Hide resolved
This fixes #11337 to allow for merging of a tree with another when the the file already exists in the tree being merged into.
a179828
into
angular:master
15 checks passed
15 checks passed
ci/angular: merge status
All checks passed!
ci/angular: size
No size change against base branch.
cla/google
All necessary CLAs are signed
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.
This fixes #11337 to allow for merging of a tree with another when the the file already exists in the tree being merged into.