diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-27 09:15:42 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-27 09:15:42 +0000 |
commit | 6aa18de98efe5d7965a48caf5bc3bdea8ac6bca4 (patch) | |
tree | b4c416ea40aa656517754eb00964445d81bf27ef /editors/code | |
parent | d2619bf0ca0c8c2ff8cda22beec9851887e4a4d5 (diff) | |
parent | 51156cbf030439525d4aa5182acd7e72a699c542 (diff) |
Merge #3693
3693: vscode: show release tag with along with the commit hash for RA version command r=matklad a=Veetaha
Co-authored-by: veetaha <[email protected]>
Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/src/commands/server_version.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/editors/code/src/commands/server_version.ts b/editors/code/src/commands/server_version.ts index 03528b825..d64ac726e 100644 --- a/editors/code/src/commands/server_version.ts +++ b/editors/code/src/commands/server_version.ts | |||
@@ -4,7 +4,12 @@ import { Ctx, Cmd } from '../ctx'; | |||
4 | 4 | ||
5 | export function serverVersion(ctx: Ctx): Cmd { | 5 | export function serverVersion(ctx: Ctx): Cmd { |
6 | return async () => { | 6 | return async () => { |
7 | const version = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" }).stdout; | 7 | const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" }); |
8 | vscode.window.showInformationMessage('rust-analyzer version : ' + version); | 8 | const commitHash = stdout.slice(`rust-analyzer `.length).trim(); |
9 | const { releaseTag } = ctx.config.package; | ||
10 | |||
11 | void vscode.window.showInformationMessage( | ||
12 | `rust-analyzer version: ${releaseTag ?? "unreleased"} (${commitHash})` | ||
13 | ); | ||
9 | }; | 14 | }; |
10 | } | 15 | } |