From e871c3a857005c2c55fcbf4dbd48e22fe33b6451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 Jul 2022 09:42:53 +0200 Subject: [PATCH] image: 'system-image' throws when given an incorrect image format. Previously 'system-image' would return *unspecified* in that case, leading to a wrong-type-arg error crash down the road. * gnu/system/image.scm (system-image): Add 'else' clause. --- gnu/system/image.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 5972a944d7..f1739a35c1 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -842,7 +842,10 @@ (define target (cond ;; This happens if some limits are exceeded, see: ;; https://lists.gnu.org/archive/html/grub-devel/2020-06/msg00048.html #:grub-mkrescue-environment - '(("MKRESCUE_SED_MODE" . "mbr_only")))))))) + '(("MKRESCUE_SED_MODE" . "mbr_only")))) + (else + (raise (formatted-message + (G_ "~a: unsupported image format") image-format))))))) ;;