diff options
| author | Dax <[email protected]> | 2026-02-18 17:55:50 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-18 22:55:50 +0000 |
| commit | 5d12eb952853ea94881e3a06e8213b7e0f20975c (patch) | |
| tree | baddc6723fe7a75d2a6d71aca8f9f0106f76854e | |
| parent | 6fb4f2a7a5d768c11fafdeae4aa8b5c7fcb46b44 (diff) | |
| download | opencode-5d12eb952853ea94881e3a06e8213b7e0f20975c.tar.gz opencode-5d12eb952853ea94881e3a06e8213b7e0f20975c.zip | |
refactor: migrate src/shell/shell.ts from Bun.file() to statSync (#14134)
| -rw-r--r-- | packages/opencode/src/shell/shell.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/opencode/src/shell/shell.ts b/packages/opencode/src/shell/shell.ts index 2e8d48bfd..e7b7cdb3e 100644 --- a/packages/opencode/src/shell/shell.ts +++ b/packages/opencode/src/shell/shell.ts @@ -1,5 +1,6 @@ import { Flag } from "@/flag/flag" import { lazy } from "@/util/lazy" +import { Filesystem } from "@/util/filesystem" import path from "path" import { spawn, type ChildProcess } from "child_process" @@ -43,7 +44,7 @@ export namespace Shell { // git.exe is typically at: C:\Program Files\Git\cmd\git.exe // bash.exe is at: C:\Program Files\Git\bin\bash.exe const bash = path.join(git, "..", "..", "bin", "bash.exe") - if (Bun.file(bash).size) return bash + if (Filesystem.stat(bash)?.size) return bash } return process.env.COMSPEC || "cmd.exe" } |
