fix test-child-process-env on windows

This commit is contained in:
Igor Zinkovsky authored and Ryan Dahl committed 2011-08-01 14:49:10 -07:00
1 parent 1710bea355
commit 925b467a4e
1 file changed
+8 -1
+8 -1
View File
@@ -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 = '';