Search code examples
gulpgulp-shell

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?


Solution

  • 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'
    ]));