From 4b5435b52bdcb54eea18c80f952cfc3a72975e70 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 20 Mar 2020 12:50:50 +0100 Subject: Make from-source install use cargo installed binary by default --- editors/code/src/config.ts | 4 ++-- editors/code/src/main.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'editors/code/src') diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 54b905303..be5296fcf 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -44,11 +44,11 @@ export class Config { .packageJSON .version; - readonly releaseTag: string = vscode + readonly releaseTag: string | undefined = vscode .extensions .getExtension(this.extensionId)! .packageJSON - .releaseTag; + .releaseTag ?? undefined; private cfg!: vscode.WorkspaceConfiguration; diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 5297614a9..5d2da9a76 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -110,6 +110,7 @@ async function bootstrap(config: Config, state: PersistentState): Promise { + if (config.releaseTag === undefined) return; if (config.channel === "stable") { if (config.releaseTag === NIGHTLY_TAG) { vscode.window.showWarningMessage(`You are running a nightly version of rust-analyzer extension. @@ -184,6 +185,7 @@ async function getServer(config: Config, state: PersistentState): Promise