Skip to content

Commit

Permalink
fix(install): support for npm no_proxy (puppeteer#1314)
Browse files Browse the repository at this point in the history
This patch adds support for npm `no_proxy` configuration for the installation script.
  • Loading branch information
tomasAlabes authored and aslushnikov committed Nov 8, 2017
1 parent b7566c1 commit 73f5b80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 73f5b80

Please sign in to comment.