fix(install): support for npm no_proxy (#1314)

This patch adds support for npm `no_proxy` configuration for the installation script.
This commit is contained in:
Tomas Alabes 2017-11-07 20:16:22 -08:00 committed by Andrey Lushnikov
parent b7566c1a83
commit 73f5b806a3

View File

@ -36,10 +36,14 @@ if (revisionInfo.downloaded)
// Override current environment proxy settings with npm configuration, if any.
const NPM_HTTPS_PROXY = process.env.npm_config_https_proxy || process.env.npm_config_proxy;
const NPM_HTTP_PROXY = process.env.npm_config_http_proxy || process.env.npm_config_proxy;
const NPM_NO_PROXY = process.env.npm_config_no_proxy;
if (NPM_HTTPS_PROXY)
process.env.HTTPS_PROXY = NPM_HTTPS_PROXY;
if (NPM_HTTP_PROXY)
process.env.HTTP_PROXY = NPM_HTTP_PROXY;
if (NPM_NO_PROXY)
process.env.NO_PROXY = NPM_NO_PROXY;
const allRevisions = Downloader.downloadedRevisions();
const DOWNLOAD_HOST = process.env.PUPPETEER_DOWNLOAD_HOST || process.env.npm_config_puppeteer_download_host;