aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-03-20 11:50:50 +0000
committerAleksey Kladov <[email protected]>2020-03-20 12:07:12 +0000
commit4b5435b52bdcb54eea18c80f952cfc3a72975e70 (patch)
treead911289cd4e28036f7a8442422f05a2b97d3268 /editors/code
parent467a040509cd6732de48907e025f83b57b5701b9 (diff)
Make from-source install use cargo installed binary by default
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json2
-rw-r--r--editors/code/src/config.ts4
-rw-r--r--editors/code/src/main.ts2
3 files changed, 5 insertions, 3 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 2cb48abb7..7f1aa2273 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -6,7 +6,7 @@
6 "private": true, 6 "private": true,
7 "icon": "icon.png", 7 "icon": "icon.png",
8 "version": "0.4.0-dev", 8 "version": "0.4.0-dev",
9 "releaseTag": "nightly", 9 "releaseTag": null,
10 "publisher": "matklad", 10 "publisher": "matklad",
11 "repository": { 11 "repository": {
12 "url": "https://github.com/rust-analyzer/rust-analyzer.git", 12 "url": "https://github.com/rust-analyzer/rust-analyzer.git",
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 {
44 .packageJSON 44 .packageJSON
45 .version; 45 .version;
46 46
47 readonly releaseTag: string = vscode 47 readonly releaseTag: string | undefined = vscode
48 .extensions 48 .extensions
49 .getExtension(this.extensionId)! 49 .getExtension(this.extensionId)!
50 .packageJSON 50 .packageJSON
51 .releaseTag; 51 .releaseTag ?? undefined;
52 52
53 private cfg!: vscode.WorkspaceConfiguration; 53 private cfg!: vscode.WorkspaceConfiguration;
54 54
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<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.releaseTag === undefined) return;
113 if (config.channel === "stable") { 114 if (config.channel === "stable") {
114 if (config.releaseTag === NIGHTLY_TAG) { 115 if (config.releaseTag === NIGHTLY_TAG) {
115 vscode.window.showWarningMessage(`You are running a nightly version of rust-analyzer extension. 116 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<string
184 } 185 }
185 return explicitPath; 186 return explicitPath;
186 }; 187 };
188 if (config.releaseTag === undefined) return "rust-analyzer";
187 189
188 let binaryName: string | undefined = undefined; 190 let binaryName: string | undefined = undefined;
189 if (process.arch === "x64" || process.arch === "x32") { 191 if (process.arch === "x64" || process.arch === "x32") {