summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorDax <[email protected]>2026-02-18 19:20:03 -0500
committerGitHub <[email protected]>2026-02-18 19:20:03 -0500
commita8347c3762881f03e096e484a72302302f025a65 (patch)
treed78dd9e29a144575ae4ed9718bb2c24fa41108c1 /packages
parent57b63ea83d5926ee23f72185c6fb8894654e2981 (diff)
downloadopencode-a8347c3762881f03e096e484a72302302f025a65.tar.gz
opencode-a8347c3762881f03e096e484a72302302f025a65.zip
refactor: migrate src/storage/db.ts from Bun.file() to statSync (#14124)
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/storage/db.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/opencode/src/storage/db.ts b/packages/opencode/src/storage/db.ts
index 0974cbe7b..6d7bfd728 100644
--- a/packages/opencode/src/storage/db.ts
+++ b/packages/opencode/src/storage/db.ts
@@ -10,7 +10,7 @@ import { Log } from "../util/log"
import { NamedError } from "@opencode-ai/util/error"
import z from "zod"
import path from "path"
-import { readFileSync, readdirSync } from "fs"
+import { readFileSync, readdirSync, existsSync } from "fs"
import * as schema from "./schema"
declare const OPENCODE_MIGRATIONS: { sql: string; timestamp: number }[] | undefined
@@ -54,7 +54,7 @@ export namespace Database {
const sql = dirs
.map((name) => {
const file = path.join(dir, name, "migration.sql")
- if (!Bun.file(file).size) return
+ if (!existsSync(file)) return
return {
sql: readFileSync(file, "utf-8"),
timestamp: time(name),