diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-01-08 11:45:35 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-01-08 11:45:35 +0100 |
commit | 1e63ecee0b5e1d7e4894af5a51cceeba0092693c (patch) | |
tree | 54c3349ed77c9a96bbf47ffc6490f6ec3a78f9ad /guix | |
parent | f4596f7630ba8d281b972ebd40fd9947ef79e957 (diff) | |
download | gnu-guix-1e63ecee0b5e1d7e4894af5a51cceeba0092693c.tar gnu-guix-1e63ecee0b5e1d7e4894af5a51cceeba0092693c.tar.gz |
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.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/crate.scm | 4 |
1 files changed, 3 insertions, 1 deletions
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")) |