Skip to content

fix: resolve homebrew upgrade requiring multiple runs (#5375)#10118

Merged
rekram1-node merged 2 commits intoanomalyco:devfrom
GeneCodeSavvy:fix-5375-homebrew-upgrade
Feb 10, 2026
Merged

fix: resolve homebrew upgrade requiring multiple runs (#5375)#10118
rekram1-node merged 2 commits intoanomalyco:devfrom
GeneCodeSavvy:fix-5375-homebrew-upgrade

Conversation

@GeneCodeSavvy
Copy link
Contributor

@GeneCodeSavvy GeneCodeSavvy commented Jan 23, 2026

Fixes #5375

The root cause was that for tap-installed formulas, version detection could fall back to a stale source and Homebrew’s auto-update behavior was being suppressed, so users wouldn’t always see the latest tap changes on the first run.

What does this PR do?

  • Remove HOMEBREW_NO_AUTO_UPDATE: Let brew auto-update taps before
    upgrading (default behavior)

  • Fix version detection for tap formulas: Use brew info --json=v2
    for tap formulas instead of falling back to npm registry

UPDATE:

  • Removing HOMEBREW_NO_AUTO_UPDATE updates all taps which is un-wanted.
  • Instead, we Manually git pull only the "anomalyco/tap" tap repo
  • Then run brew upgrade for the "anomalyco/tap/opencode"

How did you verify your code works?

Running the command bun run dev upgrade --print-logs

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

HOMEBREW_NO_AUTO_UPDATE: "1",
...process.env,
})
// Don't set HOMEBREW_NO_AUTO_UPDATE - let brew auto-update taps before upgrading
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why we'd need to do this? Im not a brew expert but why would we need to update other brew deps? I feel like HOMEBREW_NO_AUTO_UPDATE exists for the exact reason we are using it no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh nice catch. Not a homebrew expert either. The command worked for me without the flag.

Making changes

@GeneCodeSavvy GeneCodeSavvy force-pushed the fix-5375-homebrew-upgrade branch 2 times, most recently from b11dcda to 0910947 Compare January 23, 2026 01:17
@GeneCodeSavvy
Copy link
Contributor Author

@rekram1-node After gpting this command would be the best workaround. wdyt?

@rekram1-node
Copy link
Collaborator

After gpting this command would be the best workaround. wdyt?

Not sure im following

@GeneCodeSavvy
Copy link
Contributor Author

After gpting this command would be the best workaround. wdyt?

Not sure im following

What I’m proposing is: we just git pull our tap repo directly, then run brew upgrade on that formula. That way we only update anomalyco/tap and don’t touch homebrew-core or other taps.

@rekram1-node
Copy link
Collaborator

/review

…f API

Use `brew info --json=v2` to get the latest version directly from
Homebrew instead of fetching from formulae.brew.sh API. This provides
more accurate version information and reduces external dependencies.
Also removes HOMEBREW_NO_AUTO_UPDATE flag from upgrade command.
@GeneCodeSavvy GeneCodeSavvy force-pushed the fix-5375-homebrew-upgrade branch from 4df9493 to b01ea71 Compare February 10, 2026 03:12
@GeneCodeSavvy
Copy link
Contributor Author

@rekram1-node, I have addressed the review comments. Thanks

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node rekram1-node merged commit 56a7520 into anomalyco:dev Feb 10, 2026
3 of 6 checks passed
@GeneCodeSavvy GeneCodeSavvy deleted the fix-5375-homebrew-upgrade branch February 10, 2026 06:26
Colin4k1024 pushed a commit to Colin4k1024/opencode that referenced this pull request Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencode upgrade doesnt move to newest version

2 participants