diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-12-04 14:25:57 +0100 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-12-04 14:45:26 +0100 |
commit | 79fd9f40269ebc269715f1b14ebf13980f882992 (patch) | |
tree | bd58f11929fe7051dc14fa17e70d77a9779a8118 | |
parent | a59aaad6dd92039e8ac881f6a4a48c541a0f87f8 (diff) | |
download | guix-79fd9f40269ebc269715f1b14ebf13980f882992.tar.gz |
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.
-rwxr-xr-x | guix/scripts/substitute.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index adc6852321..feae2df9cb 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. |