diff --git a/cli.js b/cli.js index 995d00b0..0690a15e 100644 --- a/cli.js +++ b/cli.js @@ -88,8 +88,7 @@ var n = new nodist( distUrl, iojsDistUrl, nodistPrefix, - //replace https for http, nodejs.org/dist doesnt support https - proxy.replace('https://', 'http://'), + proxy, wantX64, envVersion ); diff --git a/lib/nodist.js b/lib/nodist.js index 755bc2c7..9fb72b58 100644 --- a/lib/nodist.js +++ b/lib/nodist.js @@ -62,11 +62,11 @@ module.exports = nodist = function nodist( wantX64, envVersion ){ - this.wantX64 = wantX64; + this.wantX64 = !!wantX64; this.sourceUrl = sourceUrl; this.iojsSourceUrl = iojsSourceUrl; this.nodistDir = nodistDir; - this.sourceDir = nodistDir+'\\'+(this.wantX64? 'v-x64': 'v'); + this.sourceDir = path.resolve(nodistDir + '/' + (this.wantX64? 'v-x64': 'v')); this.proxy = proxy; this.envVersion = envVersion; this.installedCache = null; @@ -82,7 +82,7 @@ module.exports = nodist = function nodist( * @param {boolean} wantX64 */ nodist.prototype.setWantX64 = function(wantX64) { - this.wantX64 = wantX64; + this.wantX64 = !!wantX64; };