MCPcopy
hub / github.com/AutoMaker-Org/automaker / findFirstExistingPath

Function findFirstExistingPath

libs/platform/src/system-paths.ts:957–964  ·  view source on GitHub ↗
(paths: string[])

Source from the content-addressed store, hash-verified

955 * Find the first existing path from a list of system paths
956 */
957export async function findFirstExistingPath(paths: string[]): Promise<string | null> {
958 for (const p of paths) {
959 if (await systemPathAccess(p)) {
960 return p;
961 }
962 }
963 return null;
964}
965
966/**
967 * Check if GitHub CLI is installed and return its path

Callers 5

findGitHubCliPathFunction · 0.85
findClaudeCliPathFunction · 0.85
findCodexCliPathFunction · 0.85
findGitBashPathFunction · 0.85
findOpenCodeCliPathFunction · 0.85

Calls 1

systemPathAccessFunction · 0.85

Tested by

no test coverage detected