guix-patches
[Top][All Lists]
Advanced

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

[bug#62222] [PATCH] ui: format 'display-hint' output when no arguments a


From: Antero Mejr
Subject: [bug#62222] [PATCH] ui: format 'display-hint' output when no arguments are passed.
Date: Thu, 16 Mar 2023 16:11:20 +0000

When display-hint is given format specifiers such as "~%" but no arguments,
it does not format the output, causing the specifiers to be visible in the
displayed text.

* guix/ui.scm (display-hint): Format output when no arguments are passed.
---
Steps to reproduce the issue this fixes:
$ guix build -s whatever hello

guix build: error: 'whatever' is not a supported system
hint: Try `--list-systems' to view available system types.~%

 guix/ui.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index b6c3bd04ba..7540e2194f 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -323,7 +323,7 @@ (define colorize
    ;; XXX: We should arrange so that the initial indent is wider.
    (parameterize ((%text-width (max 15 (- (terminal-columns) 5))))
      (texi->plain-text (match arguments
-                         (() message)
+                         (() (format #f message))
                          (_  (apply format #f message
                                     (map (match-lambda
                                            ((? string? str)
-- 
2.38.1






reply via email to

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