mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 21:28:51 +00:00
vscode: fix local devel
The value of releaseTag is not undefined, but null in actual package.json
This commit is contained in:
parent
3d38d4dc94
commit
68ff71e3ab
2 changed files with 7 additions and 5 deletions
|
@ -21,7 +21,7 @@ export class Config {
|
|||
|
||||
readonly package: {
|
||||
version: string;
|
||||
releaseTag: string | undefined;
|
||||
releaseTag: string | null;
|
||||
enableProposedApi: boolean | undefined;
|
||||
} = vscode.extensions.getExtension(this.extensionId)!.packageJSON;
|
||||
|
||||
|
|
|
@ -110,11 +110,13 @@ async function bootstrap(config: Config, state: PersistentState): Promise<string
|
|||
}
|
||||
|
||||
async function bootstrapExtension(config: Config, state: PersistentState): Promise<void> {
|
||||
if (config.package.releaseTag === undefined) return;
|
||||
if (config.package.releaseTag === null) return;
|
||||
if (config.channel === "stable") {
|
||||
if (config.package.releaseTag === NIGHTLY_TAG) {
|
||||
vscode.window.showWarningMessage(`You are running a nightly version of rust-analyzer extension.
|
||||
To switch to stable, uninstall the extension and re-install it from the marketplace`);
|
||||
void vscode.window.showWarningMessage(
|
||||
`You are running a nightly version of rust-analyzer extension. ` +
|
||||
`To switch to stable, uninstall the extension and re-install it from the marketplace`
|
||||
);
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
@ -185,7 +187,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string
|
|||
}
|
||||
return explicitPath;
|
||||
};
|
||||
if (config.package.releaseTag === undefined) return "rust-analyzer";
|
||||
if (config.package.releaseTag === null) return "rust-analyzer";
|
||||
|
||||
let binaryName: string | undefined = undefined;
|
||||
if (process.arch === "x64" || process.arch === "ia32") {
|
||||
|
|
Loading…
Reference in a new issue