--- Begin Message ---
Subject: |
[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
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#62222] [PATCH] ui: format 'display-hint' output when no arguments are passed. |
Date: |
Fri, 17 Mar 2023 22:08:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
Antero Mejr <antero@mailbox.org> skribis:
> 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.
Oops, good catch! Applied, thanks.
Ludo’.
--- End Message ---