Skip to content

Commit 449c51f

Browse files
alan-agius4vikerman
authored andcommitted
fix(@schematics/angular): only show ngsw-config.json file not find warning when ngswConfigPath is defined
1 parent bcd6d05 commit 449c51f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/schematics/angular/migrations/update-9/ngsw-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export function updateNGSWConfig(): Rule {
2323
for (const options of getAllOptions(target)) {
2424
const ngswConfigPath = findPropertyInAstObject(options, 'ngswConfigPath');
2525
if (!ngswConfigPath || ngswConfigPath.kind !== 'string') {
26-
logger.warn(`Cannot find file: ${ngswConfigPath}`);
2726
continue;
2827
}
2928

3029
const path = ngswConfigPath.value;
3130
const ngswConfigAst = readJsonFileAsAstObject(tree, path);
3231
if (!ngswConfigAst || ngswConfigAst.kind !== 'object') {
32+
logger.warn(`Cannot find file: ${ngswConfigPath}`);
3333
continue;
3434
}
3535

0 commit comments

Comments
 (0)