Allow specifying StrictSSL in the NPM config file

The standard way of specifying whether you want strict-ssl or not
is to add an entry into your npm config file for strict-ssl. Use
that entry (which is passed to the install.js as an environment
variable) to set the option for strictSSL in electron-download.
This commit is contained in:
Jonathan Creekmore 2015-12-21 11:28:03 -06:00
parent 67a80969f7
commit 7922082090

View file

@ -36,7 +36,7 @@ if (installedVersion === version && fs.existsSync(path.join(__dirname, paths[pla
}
// downloads if not cached
download({version: version, arch: process.env.npm_config_arch}, extractFile)
download({version: version, arch: process.env.npm_config_arch, strictSSL: process.env.npm_config_strict_ssl}, extractFile)
// unzips and makes path.txt point at the correct executable
function extractFile (err, zipPath) {