mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 23:46:13 -05:00
import: crate: Gracefully deal with missing license info.
Reported by Fis Trivial <ybbs.daans@hotmail.com>. Fixes <https://bugs.gnu.org/28987>. * guix/import/crate.scm (crate-fetch): Check whether the "license" info is present.
This commit is contained in:
parent
f4596f7630
commit
1e63ecee0b
1 changed files with 3 additions and 1 deletions
|
@ -59,7 +59,9 @@ (define (crate-kind-predicate kind)
|
|||
(repository (assoc-ref crate "repository"))
|
||||
(synopsis (assoc-ref crate "description"))
|
||||
(description (assoc-ref crate "description"))
|
||||
(license (string->license (assoc-ref crate "license")))
|
||||
(license (or (and=> (assoc-ref crate "license")
|
||||
string->license)
|
||||
'())) ;missing license info
|
||||
(path (string-append "/" version "/dependencies"))
|
||||
(deps-json (json-fetch (string-append crate-url name path)))
|
||||
(deps (assoc-ref deps-json "dependencies"))
|
||||
|
|
Loading…
Reference in a new issue