diff --git a/package.json b/package.json index f0af579..26a9c23 100644 --- a/package.json +++ b/package.json @@ -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 (http://crcn.io)", "Jared Allard ", diff --git a/src/steps/shim.ts b/src/steps/shim.ts index 99f480a..6063cbd 100644 --- a/src/steps/shim.ts +++ b/src/steps/shim.ts @@ -25,11 +25,11 @@ export default function(compiler: NexeCompiler, next: () => Promise) { 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})`});`) ) }