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 <noreply@anthropic.com>
This commit is contained in:
1 parent
bc0753dfcb
commit
24841ac5d2
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user