fix(gulp): prevent duplicate error messages

Closes #2021
This commit is contained in:
Brian Ford
2015-05-19 16:51:57 -07:00
parent 5030ffb01c
commit 381d4cb30a
3 changed files with 31 additions and 25 deletions

View File

@ -94,7 +94,9 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
if (pathsWithErrors.length) {
this.previousRunFailed = true;
throw new Error('Typescript found errors listed above...');
var error = new Error('Typescript found errors listed above...');
error['showStack'] = false;
throw error;
} else if (this.previousRunFailed) {
this.doFullBuild();
}
@ -142,7 +144,9 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
if (errorMessages.length) {
this.previousRunFailed = true;
console.log(errorMessages.join('\n'));
throw new Error('Typescript found errors listed above...');
var error = new Error('Typescript found errors listed above...');
error['showStack'] = false;
throw error;
} else {
this.previousRunFailed = false;
}