[fix] Using stderr output for exec error

This commit is contained in:
rma4ok
2013-10-12 22:14:22 -04:00
parent 8c9a6e2b54
commit 2473e5fd3c
2 changed files with 6 additions and 2 deletions

View File

@@ -15,10 +15,10 @@ module.exports = (grunt) ->
testAsync:
cmd: 'ls'
bg: true
testSync:
cmd: 'ls -la'
bg: false
testFunction:
cmd: -> 'ls'

View File

@@ -51,7 +51,11 @@ module.exports = (grunt)->
childProcess = execCmd(command, config.execOpts, (err, stdout, stderr) ->
config.done(err, stdout, stderr)
grunt.fatal err if err
if err
if config.fail
grunt.fatal err
else
stderrHandler err
taskDone()
return
)