mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
import: Guard against potential type error.
The import-gnu-release could crash with a "Wrong type (expecting pair): ()" error, as seen when attempting to recursively refresh a package, e.g.: $ guix refresh -r xdg-desktop-portal-gnome It would crash on attempting to refresh 'bash-static'. * guix/gnu-maintenance.scm (import-gnu-release): Guard against a potentially empty VERSIONS list. Change-Id: Ib4edb4b721e6053b09ef144a1b16fe23b35649b0
This commit is contained in:
parent
6465931bbc
commit
3fadea4254
1 changed files with 3 additions and 1 deletions
|
@ -801,7 +801,9 @@ list available from %GNU-FILE-LIST-URI over HTTP(S)."
|
|||
(find (cut version-prefix? version <>)
|
||||
(force versions)))
|
||||
version
|
||||
(first (force versions))))
|
||||
(match (force versions)
|
||||
((? null?) #f)
|
||||
(lst (first lst)))))
|
||||
;; Find tarballs matching this version.
|
||||
(tarballs (filter (lambda (file)
|
||||
(string=? version (tarball->version file)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue