diff --git a/bin/nexe b/bin/nexe index 960e5c7..4b73d05 100755 --- a/bin/nexe +++ b/bin/nexe @@ -55,9 +55,8 @@ function toRelative(pt) { } - require('../lib').compile({ - input : toRelative(argv.i), + input : require.resolve(toRelative(argv.i)), output : toRelative(argv.o), flags : argv.f, nodeVersion : argv.r, diff --git a/lib/exe.js b/lib/exe.js index 31158ea..56ec8f8 100644 --- a/lib/exe.js +++ b/lib/exe.js @@ -149,7 +149,15 @@ function _downloadNode (version, directory, complete) { var output = fs.createWriteStream(nodeFilePath, { "flags": "w+" }); - _logProgress(request(url)).pipe(output); + // need to set user-agent to bypass some corporate firewalls + var requestOptions = { + url: url, + headers: { + "User-Agent": "Node.js" + } + } + + _logProgress(request(requestOptions)).pipe(output); output.on("close", function () { next(); }); }, diff --git a/package.json b/package.json index 4f6b71f..dccbd3c 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "async": "~0.2.10", "colors": "~0.6.2", "glob": "~3.2.9", - "progress": "~1.1.3" "progress": "~1.1.3", "tar.gz": "0.1.1" },