summaryrefslogtreecommitdiff
path: root/guix/scripts/download.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-08-21 02:40:37 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-08-21 02:40:37 +0200
commit2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d (patch)
tree334bed3ef9be203d77065a75380696c2537ede92 /guix/scripts/download.scm
parent9c4ce3afac2ad42c832dc7a9f0932744b5fd8892 (diff)
parente904de7ec1789e243e830b19187b5ef550b2eefa (diff)
downloadguix-patches-2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d.tar
guix-patches-2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/download.scm')
-rw-r--r--guix/scripts/download.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm
index bb3dc76741..f40213be33 100644
--- a/guix/scripts/download.scm
+++ b/guix/scripts/download.scm
@@ -143,12 +143,15 @@ Supported formats: 'nix-base32' (default), 'base32', and 'base16'
(arg (or (assq-ref opts 'argument)
(leave (G_ "no download URI was specified~%"))))
(uri (or (string->uri arg)
+ (false-if-exception
+ (string->uri
+ (string-append "file://" (canonicalize-path arg))))
(leave (G_ "~a: failed to parse URI~%")
arg)))
(fetch (assq-ref opts 'download-proc))
(path (parameterize ((current-terminal-columns
(terminal-columns)))
- (fetch arg
+ (fetch (uri->string uri)
#:verify-certificate?
(assq-ref opts 'verify-certificate?))))
(hash (call-with-input-file