If no options are given to child_process.spawn, env should default to process.env
Regression.
This commit is contained in:
parent
f4f05a8851
commit
7d4e8a9a71
@ -164,10 +164,11 @@ ChildProcess.prototype.kill = function (sig) {
|
|||||||
|
|
||||||
ChildProcess.prototype.spawn = function (path, args, options, customFds) {
|
ChildProcess.prototype.spawn = function (path, args, options, customFds) {
|
||||||
args = args || [];
|
args = args || [];
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
var cwd, env;
|
var cwd, env;
|
||||||
if (options.cwd === undefined && options.env === undefined && options.customFds === undefined) {
|
if (!options || options.cwd === undefined &&
|
||||||
|
options.env === undefined &&
|
||||||
|
options.customFds === undefined) {
|
||||||
// Deprecated API: (path, args, options, env, customFds)
|
// Deprecated API: (path, args, options, env, customFds)
|
||||||
cwd = "";
|
cwd = "";
|
||||||
env = options || process.env;
|
env = options || process.env;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user