sindresorhus / grunt-shell

Run shell commands
MIT License
949 stars 126 forks source link

Version 0.6.3 requires explicit callback in options #55

Closed wolfgangmuender closed 10 years ago

wolfgangmuender commented 10 years ago

Compiling sockjs via grunt did not work after updating from 0.6.2 to 0.6.3. We have two tasks:

    shell: {
        'npm-install-sockjs': {
            command: 'npm install',
            options: {
                failOnError: true,
                stderr: true,
                stdout: true,
                execOptions: {
                    cwd: 'www/js/lib/bower_components/sockjs-client'
                },
                callback: function () {}
            }
        },
        'make-sockjs': {
            command: './node_modules/.bin/coffee bin/render.coffee --set-version `cat version` lib/all.js > sockjs.js',
            options: {
                failOnError: true,
                stderr: true,
                stdout: true,
                execOptions: {
                    cwd: 'www/js/lib/bower_components/sockjs-client'
                },
                callback: function () {}
            }
        }
    },

They are called as follows:

grunt.registerTask(
    'build-sockjs',
    'Build the SockJS client library.',
    ['shell:npm-install-sockjs', 'shell:make-sockjs']
);

We could only make it work by adding the explicit callback options.

msafi commented 10 years ago

I was having another problem that also seems to be fixed by adding the callback option!

grunt-watch will not work and exit immediately if preceded by a grunt-shell task unless the callback option is specified.

sindresorhus commented 10 years ago

reverted, try 0.6.4