Hands-on task
Publishing doesn't notice the error
The script /root/publish.sh reads the version from /srv/build/version.txt, packs the site and writes /root/published.txt. The version file is missing right now — and the script still reports success. Enable strict mode set -euo pipefail in it so that on such an error the script stops and /root/published.txt doesn't appear. When the version is in place, publishing must work as before.
- set -euo pipefail
- pipefail
- strict mode
- exit codes
- fail-fast