Artificial intelligent assistant

gulp の task を失敗させるには? `gulp.task()` 0taskgulp task var spawn = require('child_process').spawn; var gulp = require('gulp'); gulp.task('mytask', function() { var proc = spawn('my_command'); proc.on('exit', function(code, signal) { if (code !== null && code !== 0) { // gulp task } }); });

`gulp.task()`


var spawn = require('child_process').spawn;
var gulp = require('gulp');
gulp.task('mytask', function(done) {
var proc = spawn('my_command');
proc.on('exit', function(code, signal) {
if (code !== null && code !== 0) {
done('error'); // null
} else {
done(); //
}
});
});




> if ... not null and not undefined, the orchestration will stop

`done`

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 34f21960f11fe210eeaee7a9deed876a