summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-09-01 18:00:40 -0400
committerDax Raad <[email protected]>2025-09-01 18:00:40 -0400
commit61c7196bd901b0f5e8c69061abfa09400340a4a1 (patch)
tree2ecd678b7d83af5e6c77a4bc36d0f1dfa2ac76dd
parent365fdd9ff8b26908e0ce3aa86b47e9ac1d2f0109 (diff)
downloadopencode-61c7196bd901b0f5e8c69061abfa09400340a4a1.tar.gz
opencode-61c7196bd901b0f5e8c69061abfa09400340a4a1.zip
catch migration failures
-rw-r--r--packages/opencode/src/storage/storage.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/src/storage/storage.ts b/packages/opencode/src/storage/storage.ts
index d7ce04958..976cffdc7 100644
--- a/packages/opencode/src/storage/storage.ts
+++ b/packages/opencode/src/storage/storage.ts
@@ -115,7 +115,9 @@ export namespace Storage {
for (let index = migration; index < MIGRATIONS.length; index++) {
log.info("running migration", { index })
const migration = MIGRATIONS[index]
- await migration(dir)
+ await migration(dir).catch((e) => {
+ log.error("failed to run migration", { error: e, index })
+ })
await Bun.write(path.join(dir, "migration"), (index + 1).toString())
}
return {