vscode: fix release tag retrieval

Co-Authored-By: Laurențiu Nicola <lnicola@users.noreply.github.com>
This commit is contained in:
Veetaha 2020-03-27 11:05:37 +02:00 committed by GitHub
parent 0072aa31ed
commit 51156cbf03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ export function serverVersion(ctx: Ctx): Cmd {
return async () => { return async () => {
const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" }); const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" });
const commitHash = stdout.slice(`rust-analyzer `.length).trim(); const commitHash = stdout.slice(`rust-analyzer `.length).trim();
const { releaseTag } = ctx.config; const { releaseTag } = ctx.config.package;
void vscode.window.showInformationMessage( void vscode.window.showInformationMessage(
`rust-analyzer version: ${releaseTag ?? "unreleased"} (${commitHash})` `rust-analyzer version: ${releaseTag ?? "unreleased"} (${commitHash})`