File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/angular_devkit/build_angular/src/angular-cli-files/utilities Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,20 @@ export function statsToString(json: any, statsConfig: any) {
86
86
}
87
87
}
88
88
89
+ // TODO(#16193): Don't emit this warning in the first place rather than just suppressing it.
90
+ const ERRONEOUS_WARNINGS = [
91
+ / m u l t i p l e a s s e t s e m i t d i f f e r e n t c o n t e n t .* 3 r d p a r t y l i c e n s e s \. t x t / i,
92
+ ] ;
89
93
export function statsWarningsToString ( json : any , statsConfig : any ) {
90
94
const colors = statsConfig . colors ;
91
95
const rs = ( x : string ) => colors ? reset ( x ) : x ;
92
96
const y = ( x : string ) => colors ? bold ( yellow ( x ) ) : x ;
93
97
94
- return rs ( '\n' + json . warnings . map ( ( warning : any ) => y ( `WARNING in ${ warning } ` ) ) . join ( '\n\n' ) ) ;
98
+ return rs ( '\n' + json . warnings
99
+ . map ( ( warning : any ) => `${ warning } ` )
100
+ . filter ( ( warning : string ) => ! ERRONEOUS_WARNINGS . some ( ( erroneous ) => erroneous . test ( warning ) ) )
101
+ . map ( ( warning : string ) => y ( `WARNING in ${ warning } ` ) )
102
+ . join ( '\n\n' ) ) ;
95
103
}
96
104
97
105
export function statsErrorsToString ( json : any , statsConfig : any ) {
You can’t perform that action at this time.
0 commit comments