From 6d8be2805398edf36a0ec1bae2cb89168dc27362 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 9 Aug 2021 14:21:06 +0800 Subject: [PATCH] Merge bitcoin/bitcoin#22643: guix-verify: Non-zero exit code when anything fails d451b60d22576dff7a2c8d6a8b5880d9d69e397c guix-verify: Non-zero exit code when anything fails (Carl Dong) Pull request description: ``` Previously, if verification fails, the correct message will be printed, but the exit code would still be 0. ``` ACKs for top commit: achow101: ACK d451b60d22576dff7a2c8d6a8b5880d9d69e397c Tree-SHA512: 695d72121f308d8a66db780eca16878fb378b4d766de5b58c2d6f778c5661a2f7bdf37a96e8e8e283b0a46b5d55f24bca05fa7509aa1822f0854c50064200572 --- contrib/guix/guix-verify | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/guix/guix-verify b/contrib/guix/guix-verify index a6e2c4065e..3e47e1677c 100755 --- a/contrib/guix/guix-verify +++ b/contrib/guix/guix-verify @@ -73,11 +73,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 "" @@ -140,3 +142,7 @@ if (( ${#all_noncodesigned[@]} + ${#all_all[@]} == 0 )); then echo "" exit 1 fi + +if [ -n "$failure" ]; then + exit 1 +fi