Make hash-xdr.h not fail silently during build #4014
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
In hash-xdr.h explicitly use bash and fail early on fail or pipefail at any command in the script.
Why
Without enabling
errexit
orpipefail
the script will continue to run as if nothing if an error occurs.A case this happened to me recently is when
sha256sum
is not installed, as is the case commonly on macOS systems.pipefail
is not technically part of posix as far as I know, so I changed the hash-bang to reference bash explicitly. I noticed we use the bash hash-bang in another script in this repo too so I assume that is okay.Close #4013