mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -114,7 +114,7 @@ var tasks = readAllPlugins()
|
||||
.pipe(tsFilter)
|
||||
.pipe(compilation())
|
||||
.pipe(tsFilter.restore)
|
||||
.pipe(quiet ? es.through() : reporter());
|
||||
.pipe(quiet ? es.through() : reporter.end());
|
||||
|
||||
return es.duplex(input, output);
|
||||
};
|
||||
|
||||
+13
-7
@@ -18,7 +18,7 @@ function onEnd() {
|
||||
}
|
||||
|
||||
var errors = _.flatten(allErrors);
|
||||
errors.map(function (err) { console.log('*** Error:', err); });
|
||||
errors.map(function (err) { console.error('*** Error:', err); });
|
||||
console.log('*** Finished with', errors.length, 'errors.');
|
||||
}
|
||||
|
||||
@@ -26,17 +26,23 @@ module.exports = function () {
|
||||
var errors = [];
|
||||
allErrors.push(errors);
|
||||
|
||||
return function (err) {
|
||||
if (err) {
|
||||
errors.push(err);
|
||||
return;
|
||||
}
|
||||
var result = function (err) {
|
||||
errors.push(err);
|
||||
};
|
||||
|
||||
result.end = function (emitError) {
|
||||
errors.length = 0;
|
||||
onStart();
|
||||
return es.through(null, function () {
|
||||
onEnd();
|
||||
this.emit('end');
|
||||
|
||||
if (emitError && errors.length > 0) {
|
||||
this.emit('error', 'Errors occurred.');
|
||||
} else {
|
||||
this.emit('end');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return result;
|
||||
};
|
||||
Reference in New Issue
Block a user