Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
These changes are in response to PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluu committed Jan 25, 2023
1 parent fb301be commit 563e4a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/compile-solidity/package.json
Expand Up @@ -28,7 +28,7 @@
"axios-retry": "^3.1.9",
"debug": "^4.3.1",
"fs-extra": "^9.1.0",
"https-proxy-agent": "^5.0.1",
"https-proxy-agent": "^5.0.0",
"iter-tools": "^7.0.2",
"lodash": "^4.17.21",
"node-abort-controller": "^3.0.1",
Expand Down
Expand Up @@ -6,18 +6,16 @@ import originalRequire from "original-require";

// must polyfill AbortController to use axios >=0.20.0, <=0.27.2 on node <= v14.x
import "../../polyfill";
import { default as axios_plain, AxiosResponse } from "axios";
import { default as axiosPlain, AxiosResponse } from "axios";

var proxy = process.env.https_proxy || process.env.http_proxy;
var axios;
const environmentProxy = process.env.https_proxy || process.env.http_proxy;
let axios = axiosPlain;
if (proxy) {
const HttpsProxyAgent = require("https-proxy-agent");
const agent = new HttpsProxyAgent(proxy);
axios = axios_plain.create({
const agent = new HttpsProxyAgent(environmentProxy);
axios = axiosPlain.create({
httpsAgent: agent
});
} else {
axios = axios_plain;
}

import semver from "semver";
Expand Down

0 comments on commit 563e4a7

Please sign in to comment.