topgrade is failing to update Homebrew on Linux if the user doesn't own it
P-Linuxneeds PRbreakageA-step
<!--
Thanks for taking the time to fill out this bug report!
Please make sure to
[search for existing issues](https://github.com/topgrade-rs/topgrade/issues)
before filing a new one!
Questions labeled with `Optional` can be skipped.
-->
## Checklist
- [x] I have searched the issue tracker for relevant or duplicate issues.
## Erroneous Behavior
<!--
What actually happened?
-->
After updating Topgrade on Bazzite to the latest possible version (distributed via Terra repo) some users have started to experience Topgrade crashes if the user doesn't own `/home/linuxbrew/.linuxbrew` folder which seems to be the cause of the crash. It usually happens on multiple users setup since Homebrew installs itself to previously mentioned path and assigning ownership to the user who performed the installation. Branches 16.x.x and 15.x.x, previously used on Bazzite, did not have this problem in a first place.
```
The application panicked (crashed).
Message: this user should exist
Location: src/steps/os/unix.rs:314
error: Recipe `update` failed with exit code 101
```
For some users logs may reference a different code snippet: `src/steps/os/unix.rs:64` so it may be a good starting point.
## Expected Behavior
The update should have proceed further even if Homebrew was owned by a different user.
## Steps to reproduce
```bash
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # or install the system with homebrew preinstalled
# create a new user and login into it
$ topgrade
```
## Problem persists without calling from topgrade
Running `brew update` directly doesn't cause the problem apparently, at least by looking at reported issues on Bazzite repo.
- [ ] Yes
- [x] No
## Ran through `Remote Execution`
<!--
Did you run topgrade through `Remote Execution`?
-->
- [ ] Yes
- [x] No
If yes, does the issue still occur when you run topgrade directly in your
remote host?
- [ ] Yes
- [ ] No
## Additional Details
- Operation System/Version
Bazzite 44
- Installation
Provided with the system
- Topgrade version (`topgrade -V`)
topgrade 17.5.1
## Verbose Output (`topgrade -v`)
Personally I can't provide it since I never experienced it myself.
Reported issues on Bazzite repo: https://github.com/ublue-os/bazzite/issues/4698 https://github.com/ublue-os/bazzite/issues/4900 https://github.com/ublue-os/bazzite/issues/4920
关闭于 2026-06-14 13 条评论