MCPcopy Create free account
hub / github.com/backnotprop/plannotator / resolveWindowsCliCommand

Function resolveWindowsCliCommand

apps/opencode-plugin/cli-bridge.ts:121–135  ·  view source on GitHub ↗
(bin: string, env: NodeJS.ProcessEnv = process.env)

Source from the content-addressed store, hash-verified

119}
120
121export function resolveWindowsCliCommand(bin: string, env: NodeJS.ProcessEnv = process.env): string | undefined {
122 const pathValue = env.PATH || "";
123 if (!pathValue) return undefined;
124
125 const candidates = getWindowsPathCandidates(bin, env);
126 for (const dir of pathValue.split(path.delimiter)) {
127 if (!dir) continue;
128 for (const candidate of candidates) {
129 const fullPath = path.join(dir, candidate);
130 if (existsSync(fullPath)) return fullPath;
131 }
132 }
133
134 return undefined;
135}
136
137export function buildCliSpawnConfig(
138 bin: string,

Callers 1

buildCliSpawnConfigFunction · 0.85

Calls 1

getWindowsPathCandidatesFunction · 0.85

Tested by

no test coverage detected