Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Fixed spawnSync ignoring its 'env' option #8546

Closed
wants to merge 1 commit into from

Conversation

ryotakatsuki
Copy link

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=

@cjihrig
Copy link

cjihrig commented Oct 14, 2014

@ryotakatsuki84 can you please add tests.

@cjihrig
Copy link

cjihrig commented Dec 9, 2014

This LGTM. It needs a test, which is provided in #8845

@bnoordhuis
Copy link
Member

Thanks, landed in nodejs/node@ea945bf.

bnoordhuis pushed a commit to nodejs/node that referenced this pull request Dec 9, 2014
trevnorris pushed a commit that referenced this pull request Dec 11, 2014
@trevnorris
Copy link

Thanks. Landed in 946cec7.

@trevnorris trevnorris closed this Dec 11, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants