diff --git a/lib/bundle.js b/lib/bundle.js index ea8cd5d..21e4f34 100644 --- a/lib/bundle.js +++ b/lib/bundle.js @@ -112,12 +112,12 @@ var loader = function (deps, key) { if (process.argv[2] == "--child_process" && deps[argv3]) { //we've been forked and should run the module specified by argv3[3] instead of the start up module key = argv3; - process.argv = process.argv.splice(2, 2); + process.argv.splice(2, 2); //restore the argv to [0] = executable, [1] = nexejs } else if (process.argv[2] == "--child_process") { //fork called, but for a module not bundled. argv3 = process.argv[3]; - process.argv = process.argv.splice(2, 2); + process.argv.splice(1, 2); //restore the argv to [0] = executable, [1] = script global.require(argv3); return; }