summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-10-24 09:19:21 -0400
committerDax Raad <[email protected]>2025-10-24 09:20:15 -0400
commit06fe87b361a3b4cfd6395ea4f49b3f76083b0f41 (patch)
tree2cd33439c7983c072494bdad90038fe52b14538a
parent944fda45e6d799c5b1d6d5f26f88ad15a8e776ae (diff)
downloadopencode-06fe87b361a3b4cfd6395ea4f49b3f76083b0f41.tar.gz
opencode-06fe87b361a3b4cfd6395ea4f49b3f76083b0f41.zip
fix failing migration
-rw-r--r--packages/opencode/src/storage/storage.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/opencode/src/storage/storage.ts b/packages/opencode/src/storage/storage.ts
index e54fcd446..9eb0f8f51 100644
--- a/packages/opencode/src/storage/storage.ts
+++ b/packages/opencode/src/storage/storage.ts
@@ -23,6 +23,7 @@ export namespace Storage {
const MIGRATIONS: Migration[] = [
async (dir) => {
const project = path.resolve(dir, "../project")
+ if (!fs.exists(project)) return
for await (const projectDir of new Bun.Glob("*").scan({
cwd: project,
onlyFiles: false,
@@ -177,8 +178,7 @@ export namespace Storage {
async function withErrorHandling<T>(body: () => Promise<T>) {
return body().catch((e) => {
- if (!(e instanceof Error))
- throw e
+ if (!(e instanceof Error)) throw e
const errnoException = e as NodeJS.ErrnoException
if (errnoException.code === "ENOENT") {
throw new NotFoundError({ message: `Resource not found: ${errnoException.path}` })