Skip to content
Snippets Groups Projects
Unverified Commit 36225d4f authored by Carlo Zancanaro's avatar Carlo Zancanaro Committed by Ludovic Courtès
Browse files

import: elpa: Fix call-with-downloaded-file


* guix/import/elpa.scm (call-with-downloaded-file): Make function behaviour
match documentation string.

Signed-off-by: default avatarLudovic Courtès <ludo@gnu.org>
parent d835c6cc
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,13 @@ (define* (call-with-downloaded-file url proc #:optional (error-thunk #f)) ...@@ -89,7 +89,13 @@ (define* (call-with-downloaded-file url proc #:optional (error-thunk #f))
"Fetch URL, store the content in a temporary file and call PROC with that "Fetch URL, store the content in a temporary file and call PROC with that
file. Returns the value returned by PROC. On error call ERROR-THUNK and file. Returns the value returned by PROC. On error call ERROR-THUNK and
return its value or leave if it's false." return its value or leave if it's false."
(proc (http-fetch/cached (string->uri url)))) (catch #t
(lambda ()
(proc (http-fetch/cached (string->uri url))))
(lambda (key . args)
(if error-thunk
(error-thunk)
(leave (_ "~A: download failed~%") url)))))
(define (is-elpa-package? name elpa-pkg-spec) (define (is-elpa-package? name elpa-pkg-spec)
"Return true if the string NAME corresponds to the name of the package "Return true if the string NAME corresponds to the name of the package
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment