diff options
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/main.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 92c797d47..ee2c50dc7 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -192,11 +192,18 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi | |||
192 | }).catch(async (e) => { | 192 | }).catch(async (e) => { |
193 | log.error(e); | 193 | log.error(e); |
194 | if (state.releaseId === undefined) { // Show error only for the initial download | 194 | if (state.releaseId === undefined) { // Show error only for the initial download |
195 | await vscode.window.showErrorMessage(`Failed to download rust-analyzer nightly ${e}`); | 195 | await vscode.window.showErrorMessage(`Failed to download rust-analyzer nightly: ${e}`); |
196 | } | 196 | } |
197 | return undefined; | 197 | return; |
198 | }); | 198 | }); |
199 | if (release === undefined || release.id === state.releaseId) return; | 199 | if (release === undefined) { |
200 | if (state.releaseId === undefined) { // Show error only for the initial download | ||
201 | await vscode.window.showErrorMessage("Failed to download rust-analyzer nightly: empty release contents returned"); | ||
202 | } | ||
203 | return; | ||
204 | } | ||
205 | // If currently used extension is nightly and its release id matches the downloaded release id, we're already on the latest nightly version | ||
206 | if (config.package.releaseTag === NIGHTLY_TAG && release.id === state.releaseId) return; | ||
200 | 207 | ||
201 | const userResponse = await vscode.window.showInformationMessage( | 208 | const userResponse = await vscode.window.showInformationMessage( |
202 | "New version of rust-analyzer (nightly) is available (requires reload).", | 209 | "New version of rust-analyzer (nightly) is available (requires reload).", |