summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2026-03-05 21:56:41 -0500
committerDax Raad <[email protected]>2026-03-05 21:56:41 -0500
commit6e89d3e597c31fc160306763a37ab368ca2232d1 (patch)
tree214446b1868e8d31ccd2e73c32a05106e0245946
parent3ebba02d04d17efaa8339d94950d1467ac5c956f (diff)
downloadopencode-6e89d3e597c31fc160306763a37ab368ca2232d1.tar.gz
opencode-6e89d3e597c31fc160306763a37ab368ca2232d1.zip
refactor: replace Bun.write/file with Filesystem utilities in snapshot
-rw-r--r--packages/opencode/src/snapshot/index.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/opencode/src/snapshot/index.ts b/packages/opencode/src/snapshot/index.ts
index cf254b4ce..1acbdba09 100644
--- a/packages/opencode/src/snapshot/index.ts
+++ b/packages/opencode/src/snapshot/index.ts
@@ -1,6 +1,7 @@
import { $ } from "bun"
import path from "path"
import fs from "fs/promises"
+import { Filesystem } from "../util/filesystem"
import { Log } from "../util/log"
import { Flag } from "../flag/flag"
import { Global } from "../global"
@@ -271,13 +272,12 @@ export namespace Snapshot {
const target = path.join(git, "info", "exclude")
await fs.mkdir(path.join(git, "info"), { recursive: true })
if (!file) {
- await Bun.write(target, "")
+ await Filesystem.write(target, "")
return
}
- const text = await Bun.file(file)
- .text()
- .catch(() => "")
- await Bun.write(target, text)
+ const text = await Filesystem.readText(file).catch(() => "")
+
+ await Filesystem.write(target, text)
}
async function excludes() {