The comments in both build.sh and build-web.sh say that the scripts stop when any command fails:
set -o pipefail # stop if any command fails
However, pipefail only changes the exit status of pipelines. It does not make Bash exit after a standalone command fails. For example, if lake exe cache get fails, the script may still continue to the later build commands.
Would you accept a small PR that changes both scripts to:
set -e -o pipefail # stop if a command or pipeline fails
This would only modify build.sh and build-web.sh; it would not change Lean source files, proofs, or dependencies.
The comments in both
build.shandbuild-web.shsay that the scripts stop when any command fails: