guix build: Catch 'getaddrinfo-error' for '--log-file'.
* guix/scripts/build.scm (log-url)[valid-url?]: Catch 'getaddrinfo-error'.
This commit is contained in:
parent
6e94a57478
commit
c22a475725
|
@ -65,9 +65,13 @@
|
|||
found. Return #f if no build log was found."
|
||||
(define (valid-url? url)
|
||||
;; Probe URL and return #t if it is accessible.
|
||||
(catch 'getaddrinfo-error
|
||||
(lambda ()
|
||||
(guard (c ((http-get-error? c) #f))
|
||||
(close-port (http-fetch url #:buffered? #f))
|
||||
#t))
|
||||
(lambda _
|
||||
#f)))
|
||||
|
||||
(define (find-url file)
|
||||
(let ((base (basename file)))
|
||||
|
|
Loading…
Reference in New Issue