From add16af117aae69547346c4f57206f111594276a Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Fri, 6 Mar 2026 01:33:59 -0500 Subject: [PATCH] fix(opencode): fail on brew repo lookup errors --- packages/opencode/src/installation/index.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/installation/index.ts b/packages/opencode/src/installation/index.ts index 8d21ac7820..92a3bfc796 100644 --- a/packages/opencode/src/installation/index.ts +++ b/packages/opencode/src/installation/index.ts @@ -188,9 +188,14 @@ export namespace Installation { result = tap break } - const repo = (await Process.text(["brew", "--repo", "anomalyco/tap"], { env, nothrow: true })).text.trim() - if (repo) { - const pull = await Process.run(["git", "pull", "--ff-only"], { cwd: repo, env, nothrow: true }) + const repo = await Process.text(["brew", "--repo", "anomalyco/tap"], { env, nothrow: true }) + if (repo.code !== 0) { + result = repo + break + } + const dir = repo.text.trim() + if (dir) { + const pull = await Process.run(["git", "pull", "--ff-only"], { cwd: dir, env, nothrow: true }) if (pull.code !== 0) { result = pull break