guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/07: import: opam: Do not crash when description is missing.


From: guix-commits
Subject: 01/07: import: opam: Do not crash when description is missing.
Date: Mon, 23 Jan 2023 17:54:34 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit a8792bc7962c3aeaba66ed810901fcfd96ed3603
Author: Ludovic Court├Ęs <ludo@gnu.org>
AuthorDate: Mon Jan 23 18:20:41 2023 +0100

    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(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]