download: Handle content-addressed-mirrors returning #f.

* guix/build/download.scm (url-fetch): don't pass the return value from a
  content-addressed-mirror procedure to 'string->uri' if it is #f.

Change-Id: Ic4f94f86fcfebe6f2e60cb3c4330ce57886ab647
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Reepca Russelstein 2025-07-24 17:40:31 -05:00 committed by Ludovic Courtès
parent 2a333541e8
commit f607aaaaaa
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -783,7 +783,8 @@ otherwise simply ignore them."
(filter-map (match-lambda (filter-map (match-lambda
((hash-algo . hash) ((hash-algo . hash)
(let ((file (strip-store-file-name file))) (let ((file (strip-store-file-name file)))
(string->uri (make-url file hash-algo hash))))) (and=> (make-url file hash-algo hash)
string->uri))))
hashes)) hashes))
content-addressed-mirrors)) content-addressed-mirrors))