Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp-Shell is not executing any commands

I'm trying to execute something using gulp-shell. My gulfile.js contains the following content:

var gulp  = require('gulp'),
    shell = require('gulp-shell');

gulp.task('test', function() {
  shell(['echo test']);
});

Then I run it calling gulp test. This is the output I get:

Using gulpfile ~/gulpfile.js
Starting 'test'...
Finished 'test' after 2.62 ms

There's no output for my echo call.

I'm using an Ubuntu 14 VM that I connected to, using Putty.

Anyone got an idea what's wrong?

like image 637
NewGulpUserxx Avatar asked Oct 28 '14 08:10

NewGulpUserxx


1 Answers

That's because it's not the good way to use gulp-shell.

Try this, as seen in the gulp-shell README.

var gulp  = require('gulp'),
    shell = require('gulp-shell');

gulp.task('test', shell.task([
    'echo test'
]));
like image 93
tomaoq Avatar answered Oct 04 '22 17:10

tomaoq