mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Depending on the options passed through, we might not have stdout and stderr.
This commit is contained in:
parent
a89257d474
commit
7f239560f8
@ -52,8 +52,10 @@ module.exports = (grunt) ->
|
||||
stderr = []
|
||||
error = null
|
||||
proc = childProcess.spawn(options.cmd, options.args, options.opts)
|
||||
proc.stdout.on 'data', (data) -> stdout.push(data.toString())
|
||||
proc.stderr.on 'data', (data) -> stderr.push(data.toString())
|
||||
if proc.stdout?
|
||||
proc.stdout.on 'data', (data) -> stdout.push(data.toString())
|
||||
if proc.stderr?
|
||||
proc.stderr.on 'data', (data) -> stderr.push(data.toString())
|
||||
proc.on 'error', (processError) -> error ?= processError
|
||||
proc.on 'close', (exitCode, signal) ->
|
||||
error ?= new Error(signal) if exitCode isnt 0
|
||||
|
Loading…
Reference in New Issue
Block a user