mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Make extension respect http proxy settings
This commit is contained in:
parent
f0b7c02f16
commit
77b7c96aea
5 changed files with 42 additions and 15 deletions
|
@ -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<string
|
|||
|
||||
const releaseTag = config.package.releaseTag;
|
||||
const release = await downloadWithRetryDialog(state, async () => {
|
||||
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<string
|
|||
progressTitle: "Downloading rust-analyzer server",
|
||||
gunzip: true,
|
||||
mode: 0o755,
|
||||
httpProxy: config.httpProxy,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue