mirror of
https://github.com/zhigang1992/grunt-bg-shell.git
synced 2026-01-12 09:04:14 +08:00
[fix] Using stderr output for exec error
This commit is contained in:
@@ -15,10 +15,10 @@ module.exports = (grunt) ->
|
||||
|
||||
testAsync:
|
||||
cmd: 'ls'
|
||||
bg: true
|
||||
|
||||
testSync:
|
||||
cmd: 'ls -la'
|
||||
bg: false
|
||||
|
||||
testFunction:
|
||||
cmd: -> 'ls'
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user