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

Function buildDerivedCheckCommand

src/cm/lsp/serverLauncher.ts:537–554  ·  view source on GitHub ↗
(server: LspServerDefinition)

Source from the content-addressed store, hash-verified

535}
536
537function buildDerivedCheckCommand(server: LspServerDefinition): string | null {
538 const binary = resolveServerExecutable(server)?.trim() || "";
539 const install = normalizeInstallSpec(server);
540
541 if (install?.kind === "manual" && install.binaryPath) {
542 return `test -x ${quoteArg(install.binaryPath)}`;
543 }
544
545 if (binary.includes("/")) {
546 return `test -x ${quoteArg(binary)}`;
547 }
548
549 if (binary) {
550 return `which ${quoteArg(binary)}`;
551 }
552
553 return null;
554}
555
556function getUpdateCommand(server: LspServerDefinition): string | null {
557 const launcher = server.launcher;

Callers 4

getInstallCacheKeyFunction · 0.85
checkServerInstallationFunction · 0.85
ensureInstalledFunction · 0.85
performInstallCheckFunction · 0.85

Calls 3

quoteArgFunction · 0.90
resolveServerExecutableFunction · 0.85
normalizeInstallSpecFunction · 0.85

Tested by

no test coverage detected