From 77b7c96aeabb5a187b7a29cbd474f6f9b2260613 Mon Sep 17 00:00:00 2001 From: "Kam Y. Tse" Date: Sun, 7 Mar 2021 17:55:43 +0800 Subject: Make extension respect http proxy settings --- editors/code/src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editors/code/src/main.ts') diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 00393d6e8..1be4f1758 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -183,7 +183,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi } const release = await downloadWithRetryDialog(state, async () => { - return await fetchRelease("nightly", state.githubToken); + return await fetchRelease("nightly", state.githubToken, config.httpProxy); }).catch(async (e) => { log.error(e); if (state.releaseId === undefined) { // Show error only for the initial download @@ -209,6 +209,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi url: artifact.browser_download_url, dest, progressTitle: "Downloading rust-analyzer extension", + httpProxy: config.httpProxy, }); }); @@ -331,7 +332,7 @@ async function getServer(config: Config, state: PersistentState): Promise { - return await fetchRelease(releaseTag, state.githubToken); + return await fetchRelease(releaseTag, state.githubToken, config.httpProxy); }); const artifact = release.assets.find(artifact => artifact.name === `rust-analyzer-${platform}.gz`); assert(!!artifact, `Bad release: ${JSON.stringify(release)}`); @@ -343,6 +344,7 @@ async function getServer(config: Config, state: PersistentState): Promise