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

Function gitbash

packages/core/src/shell.ts:123–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121}
122
123export function gitbash() {
124 if (process.platform !== "win32") return
125 if (Flag.OPENCODE_GIT_BASH_PATH) return Flag.OPENCODE_GIT_BASH_PATH
126 const git = which("git")
127 if (!git) return
128 const file = path.join(git, "..", "..", "bin", "bash.exe")
129 if (stat(file)?.size) return file
130}
131
132function fallback() {
133 if (process.platform === "darwin") return "/bin/zsh"

Callers 2

fullFunction · 0.85
winFunction · 0.85

Calls 2

whichFunction · 0.90
statFunction · 0.70

Tested by

no test coverage detected