Repository navigation
Refuse omarchy-update when invoked as root - #13377
Chessing234 wants to merge 1 commit into
Conversation
sudo omarchy update runs mise and post-update hooks as root, so tool installs land root-owned under the user's home and break later mise use. Keep the usual per-step sudo escalation and exit early when EUID is 0.
Automated AI review
Outcome: Plain Plain
|
|
Reviewed at a9a22c9. The bug is real: The difference that matters is where the guard sits. Here it runs after The tests differ too. Codex Medium was given all four pull requests as a second opinion, without being told which one I picked, and it also chose #11479 for the same two reasons. Its independence from this review is not guaranteed. It also noted that #13660 and #12957 place their guards later still, after the trap and Nothing is needed from you. Choosing between these is the maintainer's call, so this waits on them. |
|
Thank you for this, @Chessing234. #11479 got there first with a fix for the same problem, so this is closed in favour of it, and the credit stays with the first fix. If it does not cover your case, please say so there. Closed at the maintainer's request. The review comment above has the details; it was done by Claude Opus 5.5 with Codex Medium as a second opinion, whose agreement is not independent. |
Summary
sudo omarchy updateruns mise and post-update hooks as root, leaving root-owned installs under the user's home and breaking latermise use.EUIDis 0; privileged package steps still escalate via sudo from an unprivileged caller.Fixes #13329
Test plan
bash test/shell.d/update-refuse-root-test.shomarchy updatestill works when run as the user (menu path)