If no options are given to child_process.spawn, env should default to process.env
Regression.
This commit is contained in:
Родитель
f4f05a8851
Коммит
7d4e8a9a71
|
@ -164,10 +164,11 @@ ChildProcess.prototype.kill = function (sig) {
|
|||
|
||||
ChildProcess.prototype.spawn = function (path, args, options, customFds) {
|
||||
args = args || [];
|
||||
options = options || {};
|
||||
|
||||
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)
|
||||
cwd = "";
|
||||
env = options || process.env;
|
||||
|
|
Загрузка…
Ссылка в новой задаче