Browse Source

fix test-child-process-env on windows

v0.7.4-release
Igor Zinkovsky 13 years ago
committed by Ryan Dahl
parent
commit
925b467a4e
  1. 9
      test/simple/test-child-process-env.js

9
test/simple/test-child-process-env.js

@ -24,6 +24,8 @@ var assert = require('assert');
var spawn = require('child_process').spawn;
var isWindows = process.platform === 'win32';
var env = {
'HELLO': 'WORLD'
};
@ -31,7 +33,12 @@ env.__proto__ = {
'FOO': 'BAR'
}
var child = spawn('/usr/bin/env', [], {env: env});
if (isWindows) {
var child = spawn('cmd.exe', ['/c set'], {env: env});
} else {
var child = spawn('/usr/bin/env', [], {env: env});
}
var response = '';

Loading…
Cancel
Save