diff options
| author | Dax Raad <[email protected]> | 2025-07-04 08:44:07 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-07-04 08:45:18 -0400 |
| commit | 23788674c81184d3d5ea85cc00b29756102de326 (patch) | |
| tree | efa815f90ad2b30ffc8df926a872c6f560fe0e77 | |
| parent | 121eb24e73ff8121f2f797a8679b842678a5af58 (diff) | |
| download | opencode-23788674c81184d3d5ea85cc00b29756102de326.tar.gz opencode-23788674c81184d3d5ea85cc00b29756102de326.zip | |
disable snapshots temporarily
| -rw-r--r-- | packages/opencode/src/snapshot/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/opencode/src/snapshot/index.ts b/packages/opencode/src/snapshot/index.ts index 95d7776c6..1bbb870fa 100644 --- a/packages/opencode/src/snapshot/index.ts +++ b/packages/opencode/src/snapshot/index.ts @@ -9,6 +9,7 @@ export namespace Snapshot { const log = Log.create({ service: "snapshot" }) export async function create(sessionID: string) { + return log.info("creating snapshot") const app = App.info() const git = gitdir(sessionID) @@ -45,10 +46,9 @@ export namespace Snapshot { .nothrow() log.info("commit") - // Extract commit hash from output like "[main abc1234] snapshot" const match = result.stdout.toString().match(/\[.+ ([a-f0-9]+)\]/) - if (!match) throw new Error("Failed to extract commit hash") - return match[1] + if (!match) return + return match![1] } export async function restore(sessionID: string, commit: string) { |
