← back to Exo Cluster Watchdog
fix: prevent bash set-u failure on empty notes array in alert path
f4c5553c63ad144d3e5571b49eafde78c95075ca · 2026-09-09 04:01:39 -0700 · steve@designerwallcoverings.com
macOS /bin/bash 3.2 + set -u fails on ${notes[*]} when empty.
Change to ${notes[*]:-} so WARN with zero notes emits a valid alert
rather than crashing the alert block. All 8 verification cases pass.
TK-11129
Files touched
Diff
commit f4c5553c63ad144d3e5571b49eafde78c95075ca
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date: Wed Sep 9 04:01:39 2026 -0700
fix: prevent bash set-u failure on empty notes array in alert path
macOS /bin/bash 3.2 + set -u fails on ${notes[*]} when empty.
Change to ${notes[*]:-} so WARN with zero notes emits a valid alert
rather than crashing the alert block. All 8 verification cases pass.
TK-11129
---
watchdog.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/watchdog.sh b/watchdog.sh
index de2b5cf..80946b9 100755
--- a/watchdog.sh
+++ b/watchdog.sh
@@ -176,7 +176,7 @@ PREVF="$DATA/.prev_verdict"
prev=$(cat "$PREVF" 2>/dev/null || echo "")
echo "$verdict" > "$PREVF"
if [ "$verdict" != "PASS" ]; then
- echo "$(now) $verdict :: $head :: ${notes[*]}" >> "$ALERTS"
+ echo "$(now) $verdict :: $head :: ${notes[*]:-}" >> "$ALERTS"
if [ "$verdict" != "$prev" ]; then
osascript -e "display notification \"$head\" with title \"exo watchdog: $verdict\"" >/dev/null 2>&1 || true
fi
← 3610137 auto-data-snapshot: 2026-09-09T03:37:19 (1 data files) — dat
·
back to Exo Cluster Watchdog
·
auto-data-snapshot: 2026-09-09T04:09:05 (1 data files) — dat cfdf851 →