diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-01-23 18:20:41 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-01-23 23:23:07 +0100 |
commit | a8792bc7962c3aeaba66ed810901fcfd96ed3603 (patch) | |
tree | a2e90591d3389d6d6e6abacf2b7a9f289eeb923b | |
parent | 9e4f1f8c339cb5f1d3dcf9b22ae74cd5b1c25053 (diff) |
import: opam: Do not crash when description is missing.
Previous 'guix import opam coccinelle' would crash due to the lack of a
description.
* guix/import/opam.scm (opam->guix-package): Call 'beautify-description'
only when "description" metadata is available.
-rw-r--r-- | guix/import/opam.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/import/opam.scm b/guix/import/opam.scm index 29b2b886bf..938a88f69d 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -382,8 +382,8 @@ or #f on failure." ,(list 'quasiquote `((upstream-name . ,name)))))) (home-page ,(metadata-ref opam-content "homepage")) (synopsis ,(metadata-ref opam-content "synopsis")) - (description ,(beautify-description - (metadata-ref opam-content "description"))) + (description ,(and=> (metadata-ref opam-content "description") + beautify-description)) (license ,(spdx-string->license (metadata-ref opam-content "license")))) (filter |