Skip to content

Commit a8b8df8

Browse files
sieukremEugen Kremer
and
Eugen Kremer
authored
fix: use proper proxy agent depending on the protocol (#84)
Co-authored-by: Eugen Kremer <eugen.kremer@siemens.com>
1 parent 902fe4e commit a8b8df8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/util.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { URL } from 'url';
88
import * as https from 'https';
99
import * as request from './request';
1010
import { DownloadPlatform } from './download';
11-
import * as createHttpProxyAgent from 'https-proxy-agent';
12-
import * as createHttpsProxyAgent from 'http-proxy-agent';
11+
import * as createHttpsProxyAgent from 'https-proxy-agent';
12+
import * as createHttpProxyAgent from 'http-proxy-agent';
1313
import { readFileSync } from 'fs';
1414

1515
export let systemDefaultPlatform: string;
@@ -34,8 +34,8 @@ export function getVSCodeDownloadUrl(version: string, platform?: DownloadPlatfor
3434
return `https://update.code.visualstudio.com/${version}/${downloadPlatform}/stable`;
3535
}
3636

37-
let PROXY_AGENT: createHttpProxyAgent.HttpsProxyAgent | undefined = undefined;
38-
let HTTPS_PROXY_AGENT: createHttpsProxyAgent.HttpProxyAgent | undefined = undefined;
37+
let PROXY_AGENT: createHttpProxyAgent.HttpProxyAgent | undefined = undefined;
38+
let HTTPS_PROXY_AGENT: createHttpsProxyAgent.HttpsProxyAgent | undefined = undefined;
3939

4040
if (process.env.npm_config_proxy) {
4141
PROXY_AGENT = createHttpProxyAgent(process.env.npm_config_proxy);

0 commit comments

Comments
 (0)