Repository navigation
Default OMARCHY_PATH in update-dev for sudo env_reset - #9966
fresh3nough wants to merge 1 commit into
Conversation
sudo omarchy update aborts after the snapshot because omarchy-update-dev dereferences OMARCHY_PATH under set -u while sudo env_reset leaves it unset. Treat a missing path as the packaged install so stock updates continue. Fixes #9953 Signed-off-by: fresh3nough <anonwurcod@proton.me>
|
Reviewed by Claude Opus 5 in Claude Code, with an independent second opinion from Codex (gpt-5.6-sol) at xhigh reasoning. The change is correct and the tests earn their place. Nothing pushed to your branch. Ran The empty-value case is the strongest thing here and no other change in this cluster covers it. On unfixed quattro One gap, and it is scope rather than a defect. Four open pull requests now address this cluster: #8590 ( Also worth knowing, and shared by every one of those changes: on a dev-linked install, |
|
Automated duplication check: this pull request looks similar to #8590, which covers the same OMARCHY_PATH default in update-dev. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
Summary
sudo omarchy updateaborts right after the system snapshot with:omarchy-update-devruns underset -euo pipefailand dereferencesOMARCHY_PATHbefore anything else.sudoresets the environment, so the variable is unset on stock installs and the step kills the whole update before packages are upgraded.Fix
Default a missing path to the packaged install, matching
omarchy-migrate,omarchy-version, and the other privileged helpers:OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}"Stock installs still exit 0 immediately. Dev checkouts keep pulling when the path is set.
Fixes #9953
Test plan
bash test/shell.d/update-dev-test.sh— all cases pass, including new ones:OMARCHY_PATH(sudoenv_reset) skips without unbound-variable errorOMARCHY_PATHskips as stockpull --ff-onlybash test/shell.d/update-sequence-test.sh— update step order unchangedenv -u OMARCHY_PATH bin/omarchy-update-dev→OMARCHY_PATH: unbound variable(exit 1)OMARCHY_PATHstill runsgit -C … pull --ff-only