From 3e54a972e1148e72bae2ca9970087e34f62f9204 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 26 Dec 2013 22:09:38 +0100 Subject: [PATCH] Automatically switch to 64bit mode can be overridden with NODIST_X64 env var fixes #16 --- cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli.js b/cli.js index 7dee4577..2eec7460 100644 --- a/cli.js +++ b/cli.js @@ -55,11 +55,14 @@ process.title = 'nodist'; // set up the necessary paths var nodePath = process.env['NODIST_PREFIX']; -var wantX64 = process.env['NODIST_X64']; var nodistPath = __dirname; + // set up proxy var proxy = (process.env.HTTP_PROXY || process.env.http_proxy || process.env.HTTPS_PROXY || process.env.https_proxy || ""); +// want x64? +var wantX64 = process.env['NODIST_X64']!=null? process.env['NODIST_X64'] : (process.arch=='x64'); // if the env var is set, use its value, other wise use process.arch + // Create a nodist instance var n = new nodist( 'http://nodejs.org/dist',