Skip to content

"open code upgrade --method=brew" fails with "$HOME must be set to run brew" #3707

Closed

Description

@e-roux

Description

Hello!

I guess this is a bug because HOME is set in my terminal. Or anything wrongly set in my brew installation?

❯ opencode upgrade --method=brew

┌  Upgrade
│
●  Using method: brew
│
●  From 1.0.7 → 1.0.9
�
■  Upgrade failed
�
■  Error: $HOME must be set to run brew.
│
│
└  Done

OpenCode version

1.0.7

Steps to reproduce

opencode upgrade --method=brew on MacOS

Screenshot and/or share link

No response

Operating System

macOC 15.7.1

Terminal

wezterm

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 1, 2025
  2. alesmartan commented on Nov 6, 2025

    @alesmartan

    same thing for me here

  3. thdxr commented on Nov 6, 2025

    @thdxr
    Member

    fixed

  4. abeisleem commented on Nov 6, 2025

    @abeisleem

    I'm still getting this. I've tried explicitly setting $HOME though it's already set export $HOME='/Users/abe'

    Upgrading from 1.0.24.

    I've also tried brew uninstall opencode && brew install [email protected] and get Warning: No available formula with the name "[email protected]". Did you mean opencode?

    EDIT:
    mind you, i used to install previously with npm install -g opencode but uninstalled due to similar upgrade errors and started using brew

  5. rekram1-node commented on Nov 6, 2025

    @rekram1-node
    Collaborator

    @abeisleem you can't install specific versions easily with homebrew, just do brew install opencode and it will or should grab the latest version

    Note: if you are using the homebrew official formula their versions are on a 4-6hr delay.

    You can also use the sst/tap/opencode version instead if you prefer

  6. abeisleem commented on Nov 6, 2025

    @abeisleem

    good enough, thanks @rekram1-node!

  7. PWCoder commented on Nov 11, 2025

    @PWCoder

    When I do this on mac today, I get this message saying that 0.14.7 is the latest version:

    (My command) > brew install opencode
    (Output) >Warning: opencode 0.14.7 is already installed and up-to-date.
    To reinstall 0.14.7, run:
    brew reinstall opencode

    How can I get it to pick up the latest version?

  8. rekram1-node commented on Nov 11, 2025

    @rekram1-node
    Collaborator

    @PWCoder maybe do brew uninstall opencode and then install fresh?

  9. PWCoder commented on Nov 11, 2025

    @PWCoder

    @rekram1-node Thanks for the reply, I had tried that.
    You got me thinking though and I updated brew and it fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions