Skip to content

Commit d451b60

Browse files
committed
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.
1 parent b620b2d commit d451b60

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contrib/guix/guix-verify

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,13 @@ verify() {
7777
echo ""
7878
echo "Hint: Either the signature is invalid or the public key is missing"
7979
echo ""
80+
failure=1
8081
elif ! diff --report-identical "$compare_manifest" "$current_manifest" 1>&2; then
8182
echo "ERR: The SHA256SUMS attestation in these two directories differ:"
8283
echo " '${compare_manifest}'"
8384
echo " '${current_manifest}'"
8485
echo ""
86+
failure=1
8587
else
8688
echo "Verified: '${current_manifest}'"
8789
echo ""
@@ -166,3 +168,7 @@ if (( ${#all_noncodesigned[@]} + ${#all_all[@]} == 0 )); then
166168
echo ""
167169
exit 1
168170
fi
171+
172+
if [ -n "$failure" ]; then
173+
exit 1
174+
fi

0 commit comments

Comments
 (0)