MCPcopy Create free account
hub / github.com/arctic-cli/interface / fallback

Function fallback

packages/arctic/src/shell/shell.ts:38–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

shell.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected