Silence jq noise when the reload guard probes dead Hyprland instances

hyprctl prints "Couldn't connect ..." on stdout for stale instance dirs
left in /run/user/*/hypr/, so jq's parse error leaked into pacman's
pre-transaction hook output. The dead instances were already skipped
correctly; only the stderr noise escaped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls3ump7hcv4oNnjWW5AXmn
This commit is contained in:
David Heinemeier Hansson
2026-08-01 22:12:01 -05:00
co-authored by Claude Fable 5
parent 9ca5f63f86
commit abe5b1ff9f
2 changed files with 15 additions and 3 deletions
+3 -1
View File
@@ -31,7 +31,9 @@ option_bool() {
local signature="$2"
local option="$3"
hyprctl_instance "$runtime_dir" "$signature" -j getoption "$option" 2>/dev/null | jq -r '.bool'
# A dead instance makes hyprctl print "Couldn't connect ..." on stdout, so
# silence jq too and let the failed pipeline skip the instance.
hyprctl_instance "$runtime_dir" "$signature" -j getoption "$option" 2>/dev/null | jq -r '.bool' 2>/dev/null
}
instances() {