mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Don't assume we have a bundled node process in BufferedProcess.
This commit is contained in:
@@ -9,7 +9,6 @@ class BufferedProcess
|
||||
|
||||
constructor: ({command, args, options, stdout, stderr, exit}={}) ->
|
||||
options ?= {}
|
||||
@addNodeDirectoryToPath(options)
|
||||
@process = ChildProcess.spawn(command, args, options)
|
||||
|
||||
stdoutClosed = true
|
||||
@@ -40,14 +39,6 @@ class BufferedProcess
|
||||
processExited = true
|
||||
triggerExitCallback()
|
||||
|
||||
addNodeDirectoryToPath: (options) ->
|
||||
options.env ?= process.env
|
||||
pathSegments = []
|
||||
nodeDirectoryPath = path.resolve(process.execPath, '..', '..', '..', '..', '..', 'Resources')
|
||||
pathSegments.push(nodeDirectoryPath)
|
||||
pathSegments.push(options.env.PATH) if options.env.PATH
|
||||
options.env = _.extend({}, options.env, PATH: pathSegments.join(path.delimiter))
|
||||
|
||||
bufferStream: (stream, onLines, onDone) ->
|
||||
stream.setEncoding('utf8')
|
||||
buffered = ''
|
||||
|
||||
Reference in New Issue
Block a user