~ruther/guix-local

1e63ecee0b5e1d7e4894af5a51cceeba0092693c — Ludovic Courtès 8 years ago f4596f7
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.
1 files changed, 3 insertions(+), 1 deletions(-)

M guix/import/crate.scm
M guix/import/crate.scm => guix/import/crate.scm +3 -1
@@ 59,7 59,9 @@
             (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"))