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

Function formatCommand

src/cm/lsp/installRuntime.ts:21–31  ·  view source on GitHub ↗
(
	command: string | string[] | null | undefined,
)

Source from the content-addressed store, hash-verified

19}
20
21export function formatCommand(
22 command: string | string[] | null | undefined,
23): string {
24 if (Array.isArray(command)) {
25 return command.map((part) => quoteArg(part)).join(" ");
26 }
27 if (typeof command === "string") {
28 return command.trim();
29 }
30 return "";
31}
32
33function wrapShellCommand(command: string): string {
34 const script = command.trim();

Callers 1

resolveStartCommandFunction · 0.90

Calls 1

quoteArgFunction · 0.85

Tested by

no test coverage detected