Skip to content

Commit 2aa73ef

Browse files
alan-agius4dgp1130
authored andcommitted
fix(@angular-devkit/schematics): only commit to disk when contents of file changes
Fixes: #16191
1 parent 1d105eb commit 2aa73ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/angular_devkit/schematics/src/tree/host-tree.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ export class HostTree implements Tree {
341341
throw new ContentHasMutatedException(path);
342342
} else {
343343
const newContent = record.apply(entry.content);
344-
this.overwrite(path, newContent);
344+
if (!newContent.equals(entry.content)) {
345+
this.overwrite(path, newContent);
346+
}
345347
}
346348
} else {
347349
throw new InvalidUpdateRecordException();

0 commit comments

Comments
 (0)