4-seasons: fix silent exit on clean days (set -e + && gotcha)

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
This commit is contained in:
Claude
2026-04-23 13:52:29 +00:00
parent 2ba34cd5fe
commit 4a14d539a4
+2 -2
View File
@@ -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."