Skip to content

Commit 5defc3f

Browse files
committed
fix: DB migrating on every run when OPENCODE_CHANNEL is e.g. 'stable'
1 parent 6253ef0 commit 5defc3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/opencode/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ const cli = yargs(args)
108108
args: process.argv.slice(2),
109109
})
110110

111-
const marker = path.join(Global.Path.data, "opencode.db")
111+
// Use the database path as the marker to trigger migration if missing
112+
const marker = Database.getChannelPath()
112113
if (!(await Filesystem.exists(marker))) {
113114
const tty = process.stderr.isTTY
114115
process.stderr.write("Performing one time database migration, may take a few minutes..." + EOL)

0 commit comments

Comments
 (0)