MCPcopy
hub / github.com/coder/mux / findAvailableCommand

Function findAvailableCommand

src/node/utils/commandDiscovery.ts:58–65  ·  view source on GitHub ↗
(commands: string[])

Source from the content-addressed store, hash-verified

56 * Returns the command name (not full path) of the first available one.
57 */
58export async function findAvailableCommand(commands: string[]): Promise<string | null> {
59 for (const cmd of commands) {
60 if (await isCommandAvailable(cmd)) {
61 return cmd;
62 }
63 }
64 return null;
65}

Callers 1

Calls 1

isCommandAvailableFunction · 0.70

Tested by

no test coverage detected