guix-commits
[Top][All Lists]
Advanced

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

branch master updated: scripts: substitute: Fix discover option.


From: guix-commits
Subject: branch master updated: scripts: substitute: Fix discover option.
Date: Fri, 04 Dec 2020 08:45:39 -0500

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 79fd9f4  scripts: substitute: Fix discover option.
79fd9f4 is described below

commit 79fd9f40269ebc269715f1b14ebf13980f882992
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Fri Dec 4 14:25:57 2020 +0100

    scripts: substitute: Fix discover option.
    
    The discover option can be unset or set to "yes/no". Handle both cases.
    
    * guix/scripts/substitute.scm (%local-substitute-urls): Fix discover option.
---
 guix/scripts/substitute.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index adc6852..feae2df9 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -1103,9 +1103,11 @@ is shorter than MAX elements, then it is directly 
returned."
 (define %local-substitute-urls
   ;; If the following option is passed to the daemon, use the substitutes list
   ;; provided by "guix discover" process.
-  (if (find-daemon-option "discover")
-      (randomize-substitute-urls (read-substitute-urls))
-      '()))
+  (let* ((option (find-daemon-option "discover"))
+         (discover? (and option (string=? option "yes"))))
+    (if discover?
+     (randomize-substitute-urls (read-substitute-urls))
+     '())))
 
 (define substitute-urls
   ;; List of substitute URLs.



reply via email to

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