From 0861ab498d87ce1314221fef3c304ab9f1a73ab0 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Fri, 30 Apr 2021 22:57:07 +0200 Subject: [PATCH 09/11] etc: committer: Don't crash if no keyword list is detected. This is required for some packages that use quasiquote and unquote-splicing in #:configure-flags. * etc/committer.scm.in (keyword-list->alist): Don't crash if no keyword list structure could be detected, instead produce a warning. --- etc/committer.scm.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/committer.scm.in b/etc/committer.scm.in index de8f954f4e..7fbeb1874e 100755 --- a/etc/committer.scm.in +++ b/etc/committer.scm.in @@ -41,7 +41,9 @@ (rnrs control) (guix gexp) (texinfo) - (texinfo plain-text)) + (texinfo plain-text) + (guix diagnostics) + (guix i18n)) (define* (break-string str #:optional (max-line-length 70)) "Break the string STR into lines that are no longer than MAX-LINE-LENGTH. @@ -209,7 +211,9 @@ corresponding to the top-level definition containing the staged changes." (match kwlist (() '()) (((? keyword? k) object . rest) - `((,k . ,object) . ,(keyword-list->alist rest))))) + `((,k . ,object) . ,(keyword-list->alist rest))) + (_ (warning (G_ "cannot interpret as keyword argument list: ‘~a’~%") '()) + '()))) (define (pairwise-foreach-keyword proc . arguments) "Apply PROC with each keyword argument and corresponding values -- 2.31.1