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.
This commit is contained in:
parent
a59aaad6dd
commit
79fd9f4026
1 changed files with 5 additions and 3 deletions
|
@ -1103,9 +1103,11 @@ is shorter than MAX elements, then it is directly returned."
|
||||||
(define %local-substitute-urls
|
(define %local-substitute-urls
|
||||||
;; If the following option is passed to the daemon, use the substitutes list
|
;; If the following option is passed to the daemon, use the substitutes list
|
||||||
;; provided by "guix discover" process.
|
;; provided by "guix discover" process.
|
||||||
(if (find-daemon-option "discover")
|
(let* ((option (find-daemon-option "discover"))
|
||||||
(randomize-substitute-urls (read-substitute-urls))
|
(discover? (and option (string=? option "yes"))))
|
||||||
'()))
|
(if discover?
|
||||||
|
(randomize-substitute-urls (read-substitute-urls))
|
||||||
|
'())))
|
||||||
|
|
||||||
(define substitute-urls
|
(define substitute-urls
|
||||||
;; List of substitute URLs.
|
;; List of substitute URLs.
|
||||||
|
|
Reference in a new issue