Archived
1
0

proxy_agent: Fix very embarrassing mistake

This commit is contained in:
Anmol Sethi 2020-12-18 04:17:18 -05:00
parent 386af14a77
commit 3efd515cdf
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB

View File

@ -32,7 +32,7 @@ export function monkeyPatch(vscode: boolean): void {
return return
} }
logger.debug(`using $HTTP_PROXY ${process.env.HTTP_PROXY}`) logger.debug(`using $HTTP_PROXY ${proxyURL}`)
let pa: http.Agent let pa: http.Agent
// The reasoning for this split is that VS Code's build process does not have // The reasoning for this split is that VS Code's build process does not have
@ -42,9 +42,9 @@ export function monkeyPatch(vscode: boolean): void {
// I can't enable esModuleInterop in VS Code's build process as it breaks and spits out // I can't enable esModuleInterop in VS Code's build process as it breaks and spits out
// a huge number of errors. // a huge number of errors.
if (vscode) { if (vscode) {
pa = new (proxyagent as any)(process.env.HTTP_PROXY) pa = new (proxyagent as any)(proxyURL)
} else { } else {
pa = new (proxyagent as any).default(process.env.HTTP_PROXY) pa = new (proxyagent as any).default(proxyURL)
} }
/** /**