Bash scripts fail quietly by default. Add this line near the top:
set -euo pipefail
-e exits on the first error, -u catches typos in variable names, and pipefail makes a pipeline fail if any stage fails, not just the last one.commit a6e65f1