Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# in
{exec} = require('child_process')
runCommand = (exp, done) ->
exec exp, (error, stdout, stderr) ->
done(true) if error or stderr
grunt.registerMultiTask 'test', 'test command', ->
conf = @
done = conf.async()
{src, dest} =
runCommand 'ls -l', (error, ret) =>
if error
grunt.log.writeln('File "' + dest + '" failed.')
return done(false)
grunt.log.writeln('File "' + ret + '" created.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment