MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / readServerVersion

Function readServerVersion

src/cm/lsp/serverLauncher.ts:568–584  ·  view source on GitHub ↗
(
  server: LspServerDefinition,
)

Source from the content-addressed store, hash-verified

566}
567
568async function readServerVersion(
569 server: LspServerDefinition,
570): Promise<string | null> {
571 const command = server.launcher?.versionCommand;
572 if (!command) return null;
573
574 try {
575 const output = await runQuickCommand(command);
576 const version = String(output || "")
577 .split("\n")
578 .map((line) => line.trim())
579 .find(Boolean);
580 return version || null;
581 } catch {
582 return null;
583 }
584}
585
586export function getInstallCommand(
587 server: LspServerDefinition,

Callers 1

checkServerInstallationFunction · 0.85

Calls 2

runQuickCommandFunction · 0.90
StringInterface · 0.85

Tested by

no test coverage detected