From 7cffaeb60473e25a7ef8c1a8cb36e1531191873a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 6 Apr 2016 23:19:00 +0200 Subject: challenge: Really exit with non-zero upon hash mismatch. Reported by John Darrington. * guix/scripts/challenge.scm (guix-challenge): Add an explicit 'exit' call when ISSUES is empty. * scripts/guix.in: Add comment about 'exit'. * doc/guix.texi (Invoking guix challenge): Mention the behavior and exit code. --- guix/scripts/challenge.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'guix/scripts') diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm index 4a0c865b07..0eb49da0cc 100644 --- a/guix/scripts/challenge.scm +++ b/guix/scripts/challenge.scm @@ -233,9 +233,11 @@ (define (guix-challenge . args) (run-with-store store (mlet* %store-monad ((items (mapm %store-monad - ensure-store-item files)) + ensure-store-item files)) (issues (discrepancies items urls))) (for-each summarize-discrepancy issues) + (unless (null? issues) + (exit 1)) (return (null? issues))) #:system system))))))) -- cgit v1.2.3