From 1e63ecee0b5e1d7e4894af5a51cceeba0092693c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 8 Jan 2018 11:45:35 +0100 Subject: import: crate: Gracefully deal with missing license info. Reported by Fis Trivial . Fixes . * guix/import/crate.scm (crate-fetch): Check whether the "license" info is present. --- guix/import/crate.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 233a20e983..a7485bb4d0 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -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")) -- cgit v1.2.3