m19c / gulp-run

Pipe to shell commands in gulp
ISC License
151 stars 25 forks source link

Run after run? #39

Closed afilp closed 9 years ago

afilp commented 9 years ago

Hi,

I try the following:

gulp.task('npmpack', function () {
    del('myModule-0.1.0.tgz');
    run('npm pack').exec();
    run('npm i myModule-0.1.0.tgz').exec();

But it seems that the 2nd run needs to wait for the 1st run to be completed, as I get the following error:

npm ERR! registry error parsing json npm ERR! Windows_NT 6.3.9600 ... more ERR! below....

Is there a way to solve this through your options?

Thx.

afilp commented 9 years ago

OK, I found the solution (5 minutes afterwards...!), I had to use the callback option. Sorry for the trouble.