Use stdout directly

This commit is contained in:
Edwin Cheng 2020-02-21 15:51:55 +08:00
parent 489be40d3a
commit 319a09847b

View file

@ -14,8 +14,7 @@ export function serverVersion(ctx: Ctx): Cmd {
); );
} }
const res = spawnSync(binaryPath, ["--version"]); const version = spawnSync(binaryPath, ["--version"], { encoding: "utf8" }).stdout;
const version = res.output?.filter(x => x !== null).map(String).join(" ");
vscode.window.showInformationMessage('rust-analyzer version : ' + version); vscode.window.showInformationMessage('rust-analyzer version : ' + version);
}; };
} }