()
| 121 | } |
| 122 | |
| 123 | export 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 | |
| 132 | function fallback() { |
| 133 | if (process.platform === "darwin") return "/bin/zsh" |