Skip to content

Commit 2378867

Browse files
committed
disable snapshots temporarily
1 parent 121eb24 commit 2378867

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/opencode/src/snapshot/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export namespace Snapshot {
99
const log = Log.create({ service: "snapshot" })
1010

1111
export async function create(sessionID: string) {
12+
return
1213
log.info("creating snapshot")
1314
const app = App.info()
1415
const git = gitdir(sessionID)
@@ -45,10 +46,9 @@ export namespace Snapshot {
4546
.nothrow()
4647
log.info("commit")
4748

48-
// Extract commit hash from output like "[main abc1234] snapshot"
4949
const match = result.stdout.toString().match(/\[.+ ([a-f0-9]+)\]/)
50-
if (!match) throw new Error("Failed to extract commit hash")
51-
return match[1]
50+
if (!match) return
51+
return match![1]
5252
}
5353

5454
export async function restore(sessionID: string, commit: string) {

0 commit comments

Comments
 (0)