Browse Source

If no options are given to child_process.spawn, env should default to process.env

Regression.
v0.7.4-release
Bert Belder 15 years ago
committed by Ryan Dahl
parent
commit
7d4e8a9a71
  1. 5
      lib/child_process.js

5
lib/child_process.js

@ -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;

Loading…
Cancel
Save