From 24841ac5d24552ebb7bfe4e0491949236e22963a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 13 Sep 2026 10:21:46 +0200 Subject: [PATCH] Tell how to resume a channel switch that failed partway omarchy-channel-set runs under set -e, so a failure after it has begun mutating the system (dev link, pacman channel, packages) died silently with the switch half-applied. Trap ERR once the mutation phase starts and say how to pick the switch back up. Co-Authored-By: Claude Fable 5 --- bin/omarchy-channel-set | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/omarchy-channel-set b/bin/omarchy-channel-set index dcc9bdb4..d4c482f2 100755 --- a/bin/omarchy-channel-set +++ b/bin/omarchy-channel-set @@ -72,6 +72,10 @@ case "$channel" in ;; esac +# A failure past this point leaves the channel switch half-applied, so say how +# to pick it back up rather than dying silently under set -e. +trap 'echo -e "\nThe channel switch did not complete. Review the error above, then rerun: omarchy-channel-set '"$channel"'" >&2' ERR + if [[ -z $dev_checkout && $OMARCHY_PATH != "/usr/share/omarchy" ]]; then leaving_dev=1 fi