From 424a7bdcbb65575fa252b9a86e4e183e6f9ceb80 Mon Sep 17 00:00:00 2001 From: Alex Whitman Date: Sun, 18 Aug 2013 18:16:23 +0100 Subject: [PATCH] Unshift 'node' onto process.argv The node executable is the first value in argv. This was missing after compiling. --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index cfd9e50..fbfbc9e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -214,7 +214,7 @@ function monkeyPatchNodejs(node, next) { if(~content.indexOf('nexe')) return this(); fs.writeFile(nodejsPath, - content.replace(/\(function\(process\) \{/,'(function(process){ \n process._eval = \'require("nexe");\'; '), + content.replace(/\(function\(process\) \{/,'(function(process) {\n process._eval = \'require("nexe");\';\n process.argv.unshift("node");\n'), "utf8", this); }),