From a8792bc7962c3aeaba66ed810901fcfd96ed3603 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 23 Jan 2023 18:20:41 +0100 Subject: 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. --- guix/import/opam.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix/import') 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 -- cgit v1.2.3