Skip to content

Commit

Permalink
Update finish callback to handle errors properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Fisher committed Jul 20, 2015
1 parent 5d1d649 commit 1c95a4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ function runSequence(gulp) {
callBack = typeof taskSets[taskSets.length-1] === 'function' ? taskSets.pop() : false,
currentTaskSet,

finish = function(err) {
finish = function(e) {
gulp.removeListener('task_stop', onTaskEnd);
gulp.removeListener('task_err', onError);
if(callBack) {
callBack(err);
} else if(err) {
console.log(colors.red('Error running task sequence:'), err);
callBack(e.err);
} else if(e.err) {
console.log(colors.red('Error running task sequence:'), e.err);
}
},

Expand Down

0 comments on commit 1c95a4a

Please sign in to comment.