joyent/node — pull request #8546 by ryotakatsuki84 (2014-10-14 10:13:33+00:00)
Title: Fixed spawnSync ignoring its 'env' option

spawnSync ignores its env option. It can be reproduced using the below snippet:

var child_process = require('child_process');
var r = child_process.spawnSync("bash", ['-c', 'echo FOO=$FOO'], { env: { FOO: 'BAR' }});
console.log(r.stdout.toString());

The expected output should be:

FOO=BAR

But as the 'env' option is ignored, it simply prints:

FOO=