guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: challenge: Use exit code 2 when discrepancies are found.


From: Ludovic Courtès
Subject: 01/02: challenge: Use exit code 2 when discrepancies are found.
Date: Wed, 27 Apr 2016 21:46:11 +0000

civodul pushed a commit to branch master
in repository guix.

commit a17417a812614eee2a7e39155712d7efe814f559
Author: Ludovic Courtès <address@hidden>
Date:   Wed Apr 27 23:33:17 2016 +0200

    challenge: Use exit code 2 when discrepancies are found.
    
    Suggested by John Darrington <address@hidden>.
    
    * guix/scripts/challenge.scm (guix-challenge): Exit with 2 when MISSING
    is not empty.
    * doc/guix.texi (Invoking guix challenge): Document it.
---
 doc/guix.texi              |    3 ++-
 guix/scripts/challenge.scm |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6d64772..0d72574 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5609,7 +5609,8 @@ guix challenge @var{options} address@hidden@dots{}]
 When a difference is found between the hash of a locally-built item and
 that of a server-provided substitute, or among substitutes provided by
 different servers, the command displays it as in the example above and
-exits with a non-zero return code.
+its exit code is 2 (other non-zero exit codes denote other kinds of
+errors.)
 
 The one option that matters is:
 
diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm
index 0eb49da..149647c 100644
--- a/guix/scripts/challenge.scm
+++ b/guix/scripts/challenge.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2015, 2016 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -237,7 +237,7 @@ Challenge the substitutes for PACKAGE... provided by one or 
more servers.\n"))
                                   (issues (discrepancies items urls)))
                (for-each summarize-discrepancy issues)
                (unless (null? issues)
-                 (exit 1))
+                 (exit 2))
                (return (null? issues)))
              #:system system)))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]