I\'m using Gulp in my small project in order to run tests and lint my code. When any of those tasks fail, Gulp always exits with return code 0. If I run jshint by hand, it e
Similar to Andy Piper answer above, I have found this module stream-combiner2 to be useful when running a sequence of tasks to ensure and exit code is emitted if there is an error somewhere. Can be used something like this
var combiner = require('stream-combiner2');
var tasks = combiner.obj([
gulp.src(files),
task1(options),
task2(options),
gulp.dest('path/to/dest')
]);
tasks.on('error', function () {
process.exit(1)
});