Skip to content

Commit

Permalink
fix(proxy): only create proxy agent once
Browse files Browse the repository at this point in the history
  • Loading branch information
acburdine committed Nov 8, 2019
1 parent 51e23b9 commit b12b4c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/get-proxy-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let proxyAgent = false;
module.exports = function getProxyAgent() {
// Initialize Proxy Agent for proxy support if needed
const proxyAddress = getProxyForUrl(NPM_REGISTRY);
if (proxyAddress) {
if (proxyAddress && !proxyAgent) {
const HttpsProxyAgent = require('https-proxy-agent');
proxyAgent = new HttpsProxyAgent(proxyAddress);
}
Expand Down

0 comments on commit b12b4c7

Please sign in to comment.