fix(moonup): keep terminal open on errors via EXIT trap

The previous end-of-script `read` never ran when `set -e` aborted mid-way
(pacman conflict, paru failure, Ctrl+C), so foot closed on errors —
exactly when the user most needs to see the output.

Move the pause into a trap on EXIT, gated by `MOONUP_WAIT=1` so CLI use
stays non-interactive. Waybar on-click now sets the env var.
This commit is contained in:
2026-04-22 08:23:25 +02:00
parent c2cee85488
commit 373bfd4a9b
2 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -217,7 +217,7 @@
},
"exec": "moonarch-waybar-updates",
"interval": 60,
"on-click": "foot moonarch-update"
"on-click": "foot env MOONUP_WAIT=1 moonarch-update"
},
"custom/notification": {
"tooltip": true,