From 9295aa6103635f45ecda4d6be9362ee12453c05a Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Wed, 2 Mar 2016 16:45:48 -0500 Subject: [PATCH] Fix strict-ssl detection. When `strict-ssl` is set to a truthy value, npm always turns the environment variable into the string `true`, when the value is falsy, npm always sets it to a blank string. This fixes strict-ssl detection by always comparing the value of npm_config_strict_ssl to the string `"true"` --- npm/install.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/install.js b/npm/install.js index d0a590727dad..cf9d57037a00 100755 --- a/npm/install.js +++ b/npm/install.js @@ -36,7 +36,7 @@ if (installedVersion === version && fs.existsSync(path.join(__dirname, paths[pla } // downloads if not cached -download({version: version, platform: process.env.npm_config_platform, arch: process.env.npm_config_arch, strictSSL: process.env.npm_config_strict_ssl}, extractFile) +download({version: version, platform: process.env.npm_config_platform, arch: process.env.npm_config_arch, strictSSL: process.env.npm_config_strict_ssl === 'true'}, extractFile) // unzips and makes path.txt point at the correct executable function extractFile (err, zipPath) {