"open code upgrade --method=brew" fails with "$HOME must be set to run brew"
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
same thing for me here
fixed
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
@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
good enough, thanks @rekram1-node!
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?
@PWCoder maybe do brew uninstall opencode and then install fresh?
@rekram1-node Thanks for the reply, I had tried that. You got me thinking though and I updated brew and it fixed the issue.