File tree Expand file tree Collapse file tree
.opencode/skill/bun-file-io
packages/opencode/src/storage Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { Log } from "../util/log"
1010import { NamedError } from "@opencode-ai/util/error"
1111import z from "zod"
1212import path from "path"
13- import { readFileSync , readdirSync } from "fs"
13+ import { readFileSync , readdirSync , existsSync } from "fs"
1414import * as schema from "./schema"
1515
1616declare const OPENCODE_MIGRATIONS : { sql : string ; timestamp : number } [ ] | undefined
@@ -54,7 +54,7 @@ export namespace Database {
5454 const sql = dirs
5555 . map ( ( name ) => {
5656 const file = path . join ( dir , name , "migration.sql" )
57- if ( ! Bun . file ( file ) . size ) return
57+ if ( ! existsSync ( file ) ) return
5858 return {
5959 sql : readFileSync ( file , "utf-8" ) ,
6060 timestamp : time ( name ) ,
You can’t perform that action at this time.
0 commit comments