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