diff options
| author | Dax Raad <[email protected]> | 2025-11-11 15:11:26 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-11-11 15:11:42 -0500 |
| commit | 85f15893bcd528d3a1bf33681f42abe5210e7ebd (patch) | |
| tree | 9a7ed26dfb58d25c381ae1d206b3ab7224c51ee9 /packages | |
| parent | 98be75b17c839bd003807681234f33be5d655fbd (diff) | |
| download | opencode-85f15893bcd528d3a1bf33681f42abe5210e7ebd.tar.gz opencode-85f15893bcd528d3a1bf33681f42abe5210e7ebd.zip | |
core: prevent crash when starting in repositories without any commits yet
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/project/project.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/project/project.ts b/packages/opencode/src/project/project.ts index 8d94a5a12..381559e80 100644 --- a/packages/opencode/src/project/project.ts +++ b/packages/opencode/src/project/project.ts @@ -60,7 +60,7 @@ export namespace Project { .toSorted(), ) id = roots[0] - Bun.file(path.join(git, "opencode")).write(id) + if (id) Bun.file(path.join(git, "opencode")).write(id) } timer.stop() if (!id) { |
