Skip to content

Commit f77f45e

Browse files
author
nickpape-msft
committed
Update logging
1 parent c700c73 commit f77f45e

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

common/npm-local/package.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

gulp-core-build/src/logging.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function writeSummary(callback: () => void): void {
192192
if (shouldRelogIssues && getWarnings().length) {
193193
const warnings: string[] = getWarnings();
194194
for (let x: number = 0; x < warnings.length; x++) {
195-
console.log(gutil.colors.yellow(warnings[x]));
195+
console.error(gutil.colors.yellow(warnings[x]));
196196
}
197197
}
198198

@@ -443,13 +443,8 @@ export function warn(...args: Array<string | Chalk.ChalkChain>): void {
443443
const stringMessage: string = args.join(' ');
444444

445445
if (!localCache.errorAndWarningSupressions[stringMessage]) {
446-
if (getConfig().showWarningsAsErrors) {
447-
localCache.errors.push(stringMessage);
448-
log(gutil.colors.red.apply(undefined, args));
449-
} else {
450-
localCache.warnings.push(stringMessage);
451-
log(gutil.colors.yellow.apply(undefined, args));
452-
}
446+
localCache.errors.push(stringMessage);
447+
log(gutil.colors.yellow.apply(undefined, args));
453448
}
454449
}
455450

@@ -652,6 +647,7 @@ export function initialize(gulp: gulp.Gulp, gulpErrorCallback?: (err: Error) =>
652647
writeSummary(() => {
653648
// error if we have any errors
654649
if (localCache.taskErrors > 0 ||
650+
(getWarnings().length && getConfig().showWarningsAsErrors) ||
655651
getErrors().length ||
656652
localCache.testsFailed > 0) {
657653
exitProcess(1);

0 commit comments

Comments
 (0)