]> khamidou — GitHub mirrors - electron.git/commitdiff
Pass PATH environment in the child_process.fork spec.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 5 Sep 2013 06:55:22 +0000 (14:55 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 5 Sep 2013 06:55:22 +0000 (14:55 +0800)
The uv_spawn under Windows requires the PATH environment variable to be
there, otherwise it would throw a 203 system error, it should be a bug
of node.

spec/node/child_process.coffee

index 6d0c1dbe5e95cb70f39ad66cbfbf81e8ea4312f1..40bbd97303643ebb042a446bc471b5833fa794bf 100644 (file)
@@ -23,7 +23,7 @@ describe 'child_process', ->
     it 'should work in forked process when options.env is specifed', (done) ->
       child = child_process.fork path.join(fixtures, 'module', 'fork_ping.js'),
                                  [],
-                                 env: {test: 'somevar'}
+                                 path: process.env['PATH']
       child.on 'message', (msg) ->
         assert.equal msg, 'message'
         done()