mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 12:39:36 -05:00
download: Don't fail when abbreviating `file://' URIs.
* guix/build/download.scm (uri-abbreviation)[elide-path]: Handle the case where URI has no `host' part.
This commit is contained in:
parent
f3211ef386
commit
91a7fde456
1 changed files with 5 additions and 2 deletions
|
@ -65,8 +65,11 @@ (define uri-as-string
|
|||
|
||||
(define (elide-path)
|
||||
(let ((path (uri-path uri)))
|
||||
(string-append (symbol->string (uri-scheme uri))
|
||||
"://" (uri-host uri)
|
||||
(string-append (symbol->string (uri-scheme uri)) "://"
|
||||
|
||||
;; `file' URIs have no host part.
|
||||
(or (uri-host uri) "")
|
||||
|
||||
(string-append "/.../" (basename path)))))
|
||||
|
||||
(if (> (string-length uri-as-string) max-length)
|
||||
|
|
Loading…
Reference in a new issue