| 36 | const BLACKLIST = new Set(["fish", "nu"]) |
| 37 | |
| 38 | function fallback() { |
| 39 | if (process.platform === "win32") { |
| 40 | if (Flag.ARCTIC_GIT_BASH_PATH) return Flag.ARCTIC_GIT_BASH_PATH |
| 41 | const git = Bun.which("git") |
| 42 | if (git) { |
| 43 | // git.exe is typically at: C:\Program Files\Git\cmd\git.exe |
| 44 | // bash.exe is at: C:\Program Files\Git\bin\bash.exe |
| 45 | const bash = path.join(git, "..", "..", "bin", "bash.exe") |
| 46 | if (Bun.file(bash).size) return bash |
| 47 | } |
| 48 | return process.env.COMSPEC || "cmd.exe" |
| 49 | } |
| 50 | if (process.platform === "darwin") return "/bin/zsh" |
| 51 | const bash = Bun.which("bash") |
| 52 | if (bash) return bash |
| 53 | return "/bin/sh" |
| 54 | } |
| 55 | |
| 56 | export const preferred = lazy(() => { |
| 57 | const s = process.env.SHELL |