From 4a14d539a429fe285fdd6298a33a58e7db59fbb5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Apr 2026 13:52:29 +0000 Subject: [PATCH] 4-seasons: fix silent exit on clean days (set -e + && gotcha) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When no corrupt or grey frames exist (bad=0, grey=0), the two conditional-echo lines [ "$bad" -gt 0 ] && echo "WARNING: ..." [ "$grey" -gt 0 ] && echo "INFO: ..." exit with code 1 because [ 0 -gt 0 ] is false and && short-circuits. With set -euo pipefail the script treats that 1 as an error and exits immediately with no output — producing exactly the "ran without making a video, no error, no notification" symptom on any normal day where all frames are valid. Fix: append || true to each line so the expression always exits 0. https://claude.ai/code/session_01U29A8NpgJ41tboiggZNmk8 --- 4-seasons.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/4-seasons.sh b/4-seasons.sh index 9c56898..04aaba0 100755 --- a/4-seasons.sh +++ b/4-seasons.sh @@ -126,8 +126,8 @@ for img in "${all_images[@]}"; do fi images+=("$img") done -[ "$bad" -gt 0 ] && echo "WARNING: skipped $bad corrupt/empty frame(s) of ${#all_images[@]}" -[ "$grey" -gt 0 ] && echo "INFO: skipped $grey grey/uniform frame(s) (SEASONS_GREY_STDDEV_MIN=${GREY_MIN})" +[ "$bad" -gt 0 ] && echo "WARNING: skipped $bad corrupt/empty frame(s) of ${#all_images[@]}" || true +[ "$grey" -gt 0 ] && echo "INFO: skipped $grey grey/uniform frame(s) (SEASONS_GREY_STDDEV_MIN=${GREY_MIN})" || true if [ "${#images[@]}" -eq 0 ]; then echo "ERROR: no valid images remain after filtering — skipping $yesterday."