lib,src: fix spawnSync ignoring its 'env' option
PR-URL: https://github.com/joyent/node/pull/8546 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
691d55feca
commit
ea945bf068
@ -1264,6 +1264,7 @@ function spawnSync(/*file, args, options*/) {
|
|||||||
|
|
||||||
options.file = opts.file;
|
options.file = opts.file;
|
||||||
options.args = opts.args;
|
options.args = opts.args;
|
||||||
|
options.envPairs = opts.envPairs;
|
||||||
|
|
||||||
if (options.killSignal)
|
if (options.killSignal)
|
||||||
options.killSignal = lookupSignal(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_);
|
r = CopyJsStringArray(js_env_pairs, &env_buffer_);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
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());
|
Local<Value> js_uid = js_options->Get(env()->uid_string());
|
||||||
if (IsSet(js_uid)) {
|
if (IsSet(js_uid)) {
|
||||||
if (!CheckRange<uv_uid_t>(js_uid))
|
if (!CheckRange<uv_uid_t>(js_uid))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user