A deploy script without it continues after a failed command, so a failed composer install is followed by a successful symlink swap and a broken site reported as a successful deploy.
#!/usr/bin/env bash
set -euo pipefail
IFS=$'nt'
# -e exit on error
# -u unset variable is an error, not an empty string
# -o pipefail a pipeline fails if any stage fails, not just the last
# and the exception, where a non-zero result is expected:
if ! grep -q pattern file; then
echo 'not found'
fi
-u is the one that catches the most real bugs, because rm -rf $PREFIX/$DIR with an unset variable becomes rm -rf /. pipefail matters for anything piping into tee or jq, where the last command succeeds regardless. Note that -e does not apply inside a condition, which is why the if ! grep form works — that exemption is deliberate and worth knowing before writing a workaround for it.