MCPcopy Index your code
hub / github.com/anomalyco/opencode / select

Function select

packages/core/src/shell.ts:114–121  ·  view source on GitHub ↗
(file: string | undefined, opts?: { acceptable?: boolean })

Source from the content-addressed store, hash-verified

112}
113
114function select(file: string | undefined, opts?: { acceptable?: boolean }) {
115 if (file && (!opts?.acceptable || ok(file))) {
116 const shell = resolve(file)
117 if (shell) return shell
118 }
119 if (process.platform === "win32") return win()[0]
120 return fallback()
121}
122
123export function gitbash() {
124 if (process.platform !== "win32") return

Callers 2

preferredFunction · 0.70
acceptableFunction · 0.70

Calls 4

okFunction · 0.70
resolveFunction · 0.70
winFunction · 0.70
fallbackFunction · 0.70

Tested by

no test coverage detected