aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/code/src/config.ts2
-rw-r--r--editors/code/src/main.ts10
2 files changed, 7 insertions, 5 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 637aea27d..e77462c1b 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -21,7 +21,7 @@ export class Config {
21 21
22 readonly package: { 22 readonly package: {
23 version: string; 23 version: string;
24 releaseTag: string | undefined; 24 releaseTag: string | null;
25 enableProposedApi: boolean | undefined; 25 enableProposedApi: boolean | undefined;
26 } = vscode.extensions.getExtension(this.extensionId)!.packageJSON; 26 } = vscode.extensions.getExtension(this.extensionId)!.packageJSON;
27 27
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index de27d9535..814ae9dc2 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -110,11 +110,13 @@ async function bootstrap(config: Config, state: PersistentState): Promise<string
110} 110}
111 111
112async function bootstrapExtension(config: Config, state: PersistentState): Promise<void> { 112async function bootstrapExtension(config: Config, state: PersistentState): Promise<void> {
113 if (config.package.releaseTag === undefined) return; 113 if (config.package.releaseTag === null) return;
114 if (config.channel === "stable") { 114 if (config.channel === "stable") {
115 if (config.package.releaseTag === NIGHTLY_TAG) { 115 if (config.package.releaseTag === NIGHTLY_TAG) {
116 vscode.window.showWarningMessage(`You are running a nightly version of rust-analyzer extension. 116 void vscode.window.showWarningMessage(
117To switch to stable, uninstall the extension and re-install it from the marketplace`); 117 `You are running a nightly version of rust-analyzer extension. ` +
118 `To switch to stable, uninstall the extension and re-install it from the marketplace`
119 );
118 } 120 }
119 return; 121 return;
120 }; 122 };
@@ -185,7 +187,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string
185 } 187 }
186 return explicitPath; 188 return explicitPath;
187 }; 189 };
188 if (config.package.releaseTag === undefined) return "rust-analyzer"; 190 if (config.package.releaseTag === null) return "rust-analyzer";
189 191
190 let binaryName: string | undefined = undefined; 192 let binaryName: string | undefined = undefined;
191 if (process.arch === "x64" || process.arch === "ia32") { 193 if (process.arch === "x64" || process.arch === "ia32") {