diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-05-14 16:56:21 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-05-14 16:56:21 +0200 |
commit | c22a475725b99463de6e163a212c9398116c8aa0 (patch) | |
tree | 14dcd82c7d430347075e19755df0479fd860f205 /guix/scripts | |
parent | 6e94a574787895cd74edd4ecca3fa347ed457330 (diff) |
guix build: Catch 'getaddrinfo-error' for '--log-file'.
* guix/scripts/build.scm (log-url)[valid-url?]: Catch
'getaddrinfo-error'.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/build.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index c38ffe6e89..a02a0d5792 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -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. - (guard (c ((http-get-error? c) #f)) - (close-port (http-fetch url #:buffered? #f)) - #t)) + (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))) |