build(gulp): don't try to run cleanup.builder task if builders were not initialized
This commit is contained in:
parent
7140c9cc34
commit
fda8b1d87c
17
gulpfile.js
17
gulpfile.js
|
@ -63,9 +63,7 @@ var angularBuilder = {
|
|||
rebuildBrowserProdTree: throwToolsBuildMissingError,
|
||||
rebuildNodeTree: throwToolsBuildMissingError,
|
||||
rebuildDartTree: throwToolsBuildMissingError,
|
||||
cleanup: function() {
|
||||
return Promise.resolve();
|
||||
}
|
||||
mock: true
|
||||
};
|
||||
|
||||
|
||||
|
@ -886,9 +884,11 @@ gulp.task('cleanup.builder', function(done) {
|
|||
|
||||
// register cleanup listener for ctrl+c/kill used to quit any persistent task (autotest or serve tasks)
|
||||
process.on('SIGINT', function() {
|
||||
runSequence('cleanup.builder', function() {
|
||||
process.exit();
|
||||
});
|
||||
if (!angularBuilder.mock) {
|
||||
runSequence('cleanup.builder', function () {
|
||||
process.exit();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
@ -899,5 +899,8 @@ process.on('beforeExit', function() {
|
|||
if (beforeExitRan) return;
|
||||
|
||||
beforeExitRan = true;
|
||||
gulp.start('cleanup.builder');
|
||||
|
||||
if (!angularBuilder.mock) {
|
||||
gulp.start('cleanup.builder');
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue