upstream: Handle the case where the file name has no extension.
Fixes <https://bugs.gnu.org/42504>. Reported by Alexandru-Sergiu Marton <brown121407@posteo.ro>. * guix/upstream.scm (package-update/url-fetch): Handle the case where the file name has no extension.
This commit is contained in:
parent
069da2433e
commit
bc76f8b1f9
@ -369,7 +369,7 @@ SOURCE, an <upstream-source>."
|
|||||||
(let*-values (((archive-type)
|
(let*-values (((archive-type)
|
||||||
(match (and=> (package-source package) origin-uri)
|
(match (and=> (package-source package) origin-uri)
|
||||||
((? string? uri)
|
((? string? uri)
|
||||||
(let ((type (file-extension (basename uri))))
|
(let ((type (or (file-extension (basename uri)) "")))
|
||||||
;; Sometimes we have URLs such as
|
;; Sometimes we have URLs such as
|
||||||
;; "https://github.com/…/tarball/v0.1", in which case
|
;; "https://github.com/…/tarball/v0.1", in which case
|
||||||
;; we must not consider "1" as the extension.
|
;; we must not consider "1" as the extension.
|
||||||
|
Loading…
Reference in New Issue
Block a user