From 5d12eb952853ea94881e3a06e8213b7e0f20975c Mon Sep 17 00:00:00 2001 From: Dax Date: Wed, 18 Feb 2026 17:55:50 -0500 Subject: [PATCH] refactor: migrate src/shell/shell.ts from Bun.file() to statSync (#14134) --- packages/opencode/src/shell/shell.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" }