From fda8b1d87c717c54151d3901358ea3a8e5e7d53d Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 5 Jun 2015 23:43:11 -0700 Subject: [PATCH] build(gulp): don't try to run cleanup.builder task if builders were not initialized --- gulpfile.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 388db5a1d3..d0515fe5f4 100644 --- a/gulpfile.js +++ b/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'); + } });