Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/commands.ts')
-rw-r--r--editors/code/src/commands.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
index 849fae5cf2..9f4930c94a 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -9,7 +9,6 @@ import {
applySnippetTextEdits,
type SnippetTextDocumentEdit,
} from "./snippets";
-import { spawnSync } from "child_process";
import { type RunnableQuickPick, selectRunnable, createTask, createArgs } from "./run";
import { AstInspector } from "./ast_inspector";
import {
@@ -415,10 +414,9 @@ export function serverVersion(ctx: CtxInit): Cmd {
void vscode.window.showWarningMessage(`rust-analyzer server is not running`);
return;
}
- const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" });
- const versionString = stdout.slice(`rust-analyzer `.length).trim();
-
- void vscode.window.showInformationMessage(`rust-analyzer version: ${versionString}`);
+ void vscode.window.showInformationMessage(
+ `rust-analyzer version: ${ctx.serverVersion} [${ctx.serverPath}]`,
+ );
};
}