mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-09 18:02:48 +00:00
Make from-source install use cargo installed binary by default
This commit is contained in:
parent
467a040509
commit
4b5435b52b
6 changed files with 6 additions and 21 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ async function bootstrap(config: Config, state: PersistentState): Promise<string
|
|||
}
|
||||
|
||||
async function bootstrapExtension(config: Config, state: PersistentState): Promise<void> {
|
||||
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<string
|
|||
}
|
||||
return explicitPath;
|
||||
};
|
||||
if (config.releaseTag === undefined) return "rust-analyzer";
|
||||
|
||||
let binaryName: string | undefined = undefined;
|
||||
if (process.arch === "x64" || process.arch === "x32") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue