Defer channel switch reboot until after update

This commit is contained in:
David Heinemeier Hansson
2026-07-23 14:19:24 -07:00
parent b2f1bb6ae3
commit 347997871e
4 changed files with 141 additions and 14 deletions
+10 -1
View File
@@ -46,6 +46,7 @@ link_dev_checkout() {
dev_checkout=""
channel="$1"
leaving_dev=0
case "$channel" in
stable)
@@ -74,13 +75,21 @@ case "$channel" in
;;
esac
if [[ -z $dev_checkout && $OMARCHY_PATH != "/usr/share/omarchy" ]]; then
leaving_dev=1
fi
omarchy-refresh-pacman "$pacman_channel"
# --ask 4 accepts omarchy <-> omarchy-dev replacement prompts without file overwrites.
sudo env OMARCHY_UPDATE_PACMAN=1 pacman -S --needed --noconfirm --ask 4 "${packages[@]}"
if [[ -z $dev_checkout ]]; then
omarchy-dev-unlink
omarchy-dev-unlink --no-reboot
export OMARCHY_PATH=/usr/share/omarchy
if (( leaving_dev )); then
omarchy-state set reboot-required
fi
fi
omarchy-update -y