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."
|
found. Return #f if no build log was found."
|
||||||
(define (valid-url? url)
|
(define (valid-url? url)
|
||||||
;; Probe URL and return #t if it is accessible.
|
;; Probe URL and return #t if it is accessible.
|
||||||
(guard (c ((http-get-error? c) #f))
|
(catch 'getaddrinfo-error
|
||||||
(close-port (http-fetch url #:buffered? #f))
|
(lambda ()
|
||||||
#t))
|
(guard (c ((http-get-error? c) #f))
|
||||||
|
(close-port (http-fetch url #:buffered? #f))
|
||||||
|
#t))
|
||||||
|
(lambda _
|
||||||
|
#f)))
|
||||||
|
|
||||||
(define (find-url file)
|
(define (find-url file)
|
||||||
(let ((base (basename file)))
|
(let ((base (basename file)))
|
||||||
|
|
Loading…
Reference in New Issue