Repository navigation
fix(script): tolerate deleted TEAM_MEMBERS in release path - #26
Merged
Merged
Conversation
`@opencode-ai/script` read `.github/TEAM_MEMBERS` at module load, so `bun run release` crashed with ENOENT after the fork deleted that file (#21). The module is pulled in by the publish path via publish.ts, and `Script.team` has no consumers in the fork. Guard the read: fall back to an empty team list when the file is absent, keeping upstream behavior when it exists. Recorded in DIVERGENCES.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
bun run releasecrashes immediately:@opencode-ai/script(packages/script/src/index.ts) reads.github/TEAM_MEMBERSat module load to buildScript.team. The fork deleted that file in #21 (its team-gated upstream workflows are gone). Because the publish path imports this module (packages/opencode/script/publish.ts→import { Script } from "@opencode-ai/script"), the deleted file takes the whole release down before anything runs.Script.teamhas no consumers anywhere in the fork — the field is dead here.Fix
Guard the read with
Bun.file(teamPath).exists(): fall back to an empty team list (just the bot names) when the file is absent, preserving upstream behavior when it exists.Verification
bun run packages/script/src/index.tsnow loads cleanly and printsteam: ["actions-user", "opencode", "opencode-agent[bot]"]instead of throwing. Divergence recorded in DIVERGENCES.md.