fix(shim): properly serialize path

This commit is contained in:
Ishai Jaffe
2017-11-13 14:30:59 +02:00
committed by calebboyd
parent 3d18eae18a
commit 23f550818b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "nexe",
"description": "Create a single executable out of your Node.js application",
"license": "MIT",
"version": "2.0.0-rc.19",
"version": "2.0.0-rc.20",
"contributors": [
"Craig Condon <craig.j.condon@gmail.com> (http://crcn.io)",
"Jared Allard <jaredallard@outlook.com>",
+2 -2
View File
@@ -25,11 +25,11 @@ export default function(compiler: NexeCompiler, next: () => Promise<void>) {
if (compiler.options.fakeArgv !== false) {
const nty = !process.stdin.isTTY
const input = nty ? '[stdin]' : compiler.options.input
const input = nty ? '[stdin]' : JSON.stringify(compiler.options.input)
compiler.shims.push(
wrap(`
var r = require('path').resolve;
process.argv.splice(1,0, ${nty ? `'${input}'` : `r("${input}")`});`)
process.argv.splice(1,0, ${nty ? `'${input}'` : `r(${input})`});`)
)
}