mirror of https://github.com/nodejs/node.git
lib,src: fix spawnSync ignoring its 'env' option
PR-URL: https://github.com/joyent/node/pull/8546 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>pull/127/head
parent
691d55feca
commit
ea945bf068
|
@ -1264,6 +1264,7 @@ function spawnSync(/*file, args, options*/) {
|
|||
|
||||
options.file = opts.file;
|
||||
options.args = opts.args;
|
||||
options.envPairs = opts.envPairs;
|
||||
|
||||
if (options.killSignal)
|
||||
options.killSignal = lookupSignal(options.killSignal);
|
||||
|
|
|
@ -736,9 +736,9 @@ int SyncProcessRunner::ParseOptions(Local<Value> js_value) {
|
|||
r = CopyJsStringArray(js_env_pairs, &env_buffer_);
|
||||
if (r < 0)
|
||||
return r;
|
||||
uv_process_options_.args = reinterpret_cast<char**>(env_buffer_);
|
||||
}
|
||||
|
||||
uv_process_options_.env = reinterpret_cast<char**>(env_buffer_);
|
||||
}
|
||||
Local<Value> js_uid = js_options->Get(env()->uid_string());
|
||||
if (IsSet(js_uid)) {
|
||||
if (!CheckRange<uv_uid_t>(js_uid))
|
||||
|
|
Loading…
Reference in New Issue