diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-01-22 08:42:05 -0800 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-01-22 08:42:05 -0800 |
commit | fdc3cc9d7a2d1e12c74fc0c0939d22f40e58b52b (patch) | |
tree | 0e73ef7de9054f7d9b2fe90a5aec9ad072716865 /lib | |
parent | 6514a4128c3e7aa6c1bb1c6f3f018412fa76e5d9 (diff) | |
parent | 25f9e92813eda927c3d3eaa56dab3a397afadebe (diff) | |
download | node-merge-test.tar.gz |
Merge remote-tracking branch 'upstream/v0.10'merge-test
Conflicts:
node.gyp
Diffstat (limited to 'lib')
-rw-r--r-- | lib/child_process.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/child_process.js b/lib/child_process.js index 8afd7b225..d32b13d03 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -777,8 +777,16 @@ exports.execFile = function(file /* args, options, callback */) { }; -var spawn = exports.spawn = function(file, args, options) { - args = args ? args.slice(0) : []; +var spawn = exports.spawn = function(file /*, args, options*/) { + var args, options; + if (Array.isArray(arguments[1])) { + args = arguments[1].slice(0); + options = arguments[2]; + } else { + args = []; + options = arguments[1]; + } + args.unshift(file); var env = (options ? options.env : null) || process.env; |