Unshift 'node' onto process.argv

The node executable is the first value in argv. This was missing after
compiling.
This commit is contained in:
Alex Whitman
2013-08-18 18:16:23 +01:00
parent d44199e592
commit 424a7bdcbb
+1 -1
View File
@@ -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);
}),