We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 434198c commit 4f2bcdcCopy full SHA for 4f2bcdc
packages/schematics/angular/migrations/use-application-builder/migration.ts
@@ -460,8 +460,12 @@ function deleteFile(path: string): Rule {
460
}
461
462
function updateJsonFile(path: string, updater: (json: JSONFile) => void): Rule {
463
- return (tree) => {
464
- updater(new JSONFile(tree, path));
+ return (tree, ctx) => {
+ if (tree.exists(path)) {
465
+ updater(new JSONFile(tree, path));
466
+ } else {
467
+ ctx.logger.info(`Skipping updating '${path}' as it does not exist.`);
468
+ }
469
};
470
471
0 commit comments