Content-Length: 270485 | pFad | https://github.com/angular/components/commit/3a3a9b1c25dcca3953191f37d4f8be9b3eab5ebe

B4 fix(material/schematics): avoid overwriting files that didn't change … · angular/components@3a3a9b1 · GitHub
Skip to content

Commit 3a3a9b1

Browse files
committed
fix(material/schematics): avoid overwriting files that didn't change (#31270)
Fixes that the v20 update migration was overwriting all files, even if they didn't change. Fixes #31259. (cherry picked from commit 7b47e95)
1 parent 45fcf24 commit 3a3a9b1

File tree

1 file changed

+3
-1
lines changed
  • src/material/schematics/ng-update

1 file changed

+3
-1
lines changed

src/material/schematics/ng-update/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ function renameMdcTokens(): Rule {
5959
if (shouldRenameTokens(path)) {
6060
const content = tree.readText(path);
6161
const updatedContent = content.replace('--mdc-', '--mat-');
62-
tree.overwrite(path, updatedContent);
62+
if (content !== updatedContent) {
63+
tree.overwrite(path, updatedContent);
64+
}
6365
}
6466
});
6567
};

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/angular/components/commit/3a3a9b1c25dcca3953191f37d4f8be9b3eab5ebe

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy