Skip to content

Commit

Permalink
Correctly relaying stdout and stderr in Cakefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricemach committed Aug 20, 2011
1 parent fae2366 commit 59c6701
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ run = (args...) ->

command += ' ' + params.join ' ' if params?
cmd = spawn '/bin/sh', ['-c', command], options
cmd.stdout.on 'data', (data) -> log data.toString()
cmd.stderr.on 'data', (data) -> log data.toString()
cmd.stdout.on 'data', (data) -> process.stdout.write data
cmd.stderr.on 'data', (data) -> process.stderr.write data
process.on 'SIGHUP', -> cmd.kill()
cmd.on 'exit', (code) -> callback() if callback? and code is 0

0 comments on commit 59c6701

Please sign in to comment.