aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-08-05 19:00:57 -0400
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-20 10:36:43 +0300
commitcb491bd5a717c280e23727a2ca3918d6ff6968b3 (patch)
tree27fd40bb5c90f15bed7379db3108b6ce1c707d56
parent6a611d2e3c3ec703b2a034a3dc5422a6535c648b (diff)
downloadbitcoin-cb491bd5a717c280e23727a2ca3918d6ff6968b3.tar.xz
guix-verify: Non-zero exit code when anything fails
Previously, if verification fails, the correct message will be printed, but the exit code would still be 0. Github-Pull: bitcoin/bitcoin#22643 Rebased-From: d451b60d22576dff7a2c8d6a8b5880d9d69e397c
-rwxr-xr-xcontrib/guix/guix-verify6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/guix/guix-verify b/contrib/guix/guix-verify
index e4863f115b..02ae022741 100755
--- a/contrib/guix/guix-verify
+++ b/contrib/guix/guix-verify
@@ -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 ""
@@ -166,3 +168,7 @@ if (( ${#all_noncodesigned[@]} + ${#all_all[@]} == 0 )); then
echo ""
exit 1
fi
+
+if [ -n "$failure" ]; then
+ exit 1
+fi