Skip to content

Commit

Permalink
guix-verify: Non-zero exit code when anything fails
Browse files Browse the repository at this point in the history
Previously, if verification fails, the correct message will be printed,
but the exit code would still be 0.

Github-Pull: bitcoin#22643
Rebased-From: d451b60
  • Loading branch information
dongcarl authored and hebasto committed Aug 9, 2021
1 parent 14505ba commit 97edc6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contrib/guix/guix-verify
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ verify() {
echo ""
echo "Hint: Either the signature is invalid or the public key is missing"
echo ""
failure=1
elif ! diff --report-identical "$compare_manifest" "$current_manifest" 1>&2; then
echo "ERR: The SHA256SUMS attestation in these two directories differ:"
echo " '${compare_manifest}'"
echo " '${current_manifest}'"
echo ""
failure=1
else
echo "Verified: '${current_manifest}'"
echo ""
Expand Down Expand Up @@ -166,3 +168,7 @@ if (( ${#all_noncodesigned[@]} + ${#all_all[@]} == 0 )); then
echo ""
exit 1
fi

if [ -n "$failure" ]; then
exit 1
fi

0 comments on commit 97edc6c

Please sign in to comment.