summaryrefslogtreecommitdiff
path: root/guix/build/download.scm
diff options
context:
space:
mode:
authorTimothy Sample <samplet@ngyro.com>2021-05-05 23:10:25 -0400
committerTimothy Sample <samplet@ngyro.com>2021-05-05 23:20:36 -0400
commit7262619d6fa570fa47228daaead1b0473914c069 (patch)
tree161a5ed931b9b887c19e89b54160df46aa83b1ce /guix/build/download.scm
parent0b77d36ad0473718d7261774a0efd4d30098642a (diff)
download: Restore error reporting.
Normal error reporting was disrupted by the introduction of Disarchive in commit fbc2a52a32ddc664db8ebab420c2e17b1432c744. In particular, running 'guix download' would succeed with a partially downloaded file. * guix/build/download.scm (disarchive-fetch/any): Return '#f' when Disarchive cannot be found, the specification cannot be found, or Disarchive fails due to an error.
Diffstat (limited to 'guix/build/download.scm')
-rw-r--r--guix/build/download.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm
index ce31038b05..b14db42352 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -662,14 +662,15 @@ and write the output to FILE."
(lambda (disarchive)
(cons (module-ref disarchive '%disarchive-log-port)
(module-ref disarchive 'disarchive-assemble))))
- (#f
- (format #t "could not load Disarchive~%"))
+ (#f (format #t "could not load Disarchive~%")
+ #f)
((%disarchive-log-port . disarchive-assemble)
(match (fetch-specification uris)
- (#f
- (format #t "could not find its Disarchive specification~%"))
+ (#f (format #t "could not find its Disarchive specification~%")
+ #f)
(spec (parameterize ((%disarchive-log-port (current-output-port)))
- (disarchive-assemble spec file #:resolver resolve)))))))
+ (false-if-exception*
+ (disarchive-assemble spec file #:resolver resolve))))))))
(define* (url-fetch url file
#:key