diff --git a/lib/child_process.js b/lib/child_process.js index 0daa50c7ae..7dc46289eb 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -14,10 +14,8 @@ var spawn = exports.spawn = function (path, args /*, options OR env, customFds * exports.exec = function (command /*, options, callback */) { if (arguments.length < 3) { return exports.execFile("/bin/sh", ["-c", command], arguments[1]); - } else if (arguments.length < 4) { - return exports.execFile("/bin/sh", ["-c", command], arguments[1], arguments[2]); } else { - return exports.execFile("/bin/sh", ["-c", command], arguments[1], arguments[2], arguments[3]); + return exports.execFile("/bin/sh", ["-c", command], arguments[1], arguments[2]); } };