From 742c4307db2588bc1a81bf17106460de82c76b43 Mon Sep 17 00:00:00 2001 From: Pang Date: Tue, 12 Dec 2017 12:59:10 -0500 Subject: [PATCH] fix: space in shebang path for windows --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 30a2d32..a6e6601 100644 --- a/index.js +++ b/index.js @@ -24,14 +24,14 @@ var debug = doDebug ? function () { process.stderr.write(message + '\n') } : function () {} -var shebang = process.platform === 'os390' ? +var isWindows = require('./lib/is-windows')() + +var shebang = (process.platform === 'os390' || isWindows) ? '#!/bin/env ' : '#!' var shim = shebang + process.execPath + '\n' + fs.readFileSync(__dirname + '/shim.js') -var isWindows = require('./lib/is-windows')() - var pathRe = /^PATH=/ if (isWindows) pathRe = /^PATH=/i