Skip to content

Commit 568f32e

Browse files
committed
fixup! fix(material/schematics): gracefully skip broken css files
1 parent 2b550e3 commit 568f32e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/material/schematics/ng-generate/mdc-migration/rules/theming-styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export class ThemingStylesMigration extends Migration<ComponentMigrator[], Schem
4040
try {
4141
return processor.process(styles, {syntax: scss}).toString();
4242
} catch (e) {
43-
console.error(e);
44-
console.warn(`Failed to process stylesheet: ${filename} (see error above).`);
43+
this.context.logger.error(`${e}`);
44+
this.context.logger.warn(`Failed to process stylesheet: ${filename} (see error above).`);
4545
return styles;
4646
}
4747
}

src/material/schematics/ng-update/migrations/legacy-components-v15/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export class LegacyComponentsMigration extends Migration<null> {
4040
try {
4141
processor.process(stylesheet.content, {syntax: scss}).sync();
4242
} catch (e) {
43-
console.error(e);
44-
console.warn(`Failed to process stylesheet: ${stylesheet.filePath} (see error above).`);
43+
this.logger.error(`${e}`);
44+
this.logger.warn(`Failed to process stylesheet: ${stylesheet.filePath} (see error above).`);
4545
}
4646
}
4747

0 commit comments

Comments
 (0)