OverZealous / run-sequence

Run a series of dependent gulp tasks in order
MIT License
961 stars 56 forks source link

Only first task in sequence runs #70

Closed mfonda closed 8 years ago

mfonda commented 8 years ago

Note: we first noticed this issue after upgrading to node 4.4.4. Unsure whether or not that's related.

gulpfile.js:

var gulp = require('gulp');
var sequence = require('run-sequence');

gulp.task('foo', function (cb) {
    console.log('foo');
});
gulp.task('bar', function (cb) {
    console.log('bar');
});

gulp.task('default', function (cb) {
    sequence('foo', 'bar', cb);
});

package.json:

{
  "name": "bug-test",
  "version": "1.0.0",
  "engines": {
    "node": "4.4.4"
  },
  "devDependencies": {
    "gulp": "^3.9.0",
    "run-sequence": "^1.2"
  }
}

gulp output:

 ~/dev/run-sequence-bug# gulp
[18:00:19] Using gulpfile ~/dev/run-sequence-bug/gulpfile.js
[18:00:19] Starting 'default'...
[18:00:19] Starting 'foo'...
foo
 ~/dev/run-sequence-bug# echo $?
0
OverZealous commented 8 years ago

Your tasks aren't finishing, they aren't configured correctly. If you accept the callback in your task, you have to call it at some point.

Please read the Usage section.

I'm using run-sequence on Node 4, 5, and 6 without issue.

mfonda commented 8 years ago

@OverZealous got it, thanks! Sorry for the noise.

BlackBanner commented 6 years ago

@OverZealous , @mfonda This resolved issue, has just saved my day guys. I made same mistake of not finishing one of my tasks.

Thanks a lot