aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-11-23 16:01:44 +0100
committerLudovic Courtès <ludo@gnu.org>2024-11-23 16:01:44 +0100
commit2b8d612f4ea8d0a681c7865a84c190533de3d2f3 (patch)
treeb8af181e5d627bd6efdc9e13070b8cf2b747a599
parent3b91f2fc2541289766f6dabaab61d777b053b7df (diff)
downloadguix-2b8d612f4ea8d0a681c7865a84c190533de3d2f3.tar.gz
guix-2b8d612f4ea8d0a681c7865a84c190533de3d2f3.zip
ui: ‘display-hint’ checks column number for the right port.
This fixes (rather: works around) something like: $ guix import pypi nipype -r >/dev/null […] hint: Backtrace: […] 344:42 3 (display-hint "This indicates that the\npackage is a…" . #) In ice-9/boot-9.scm: 1747:15 2 (with-exception-handler #<procedure 7f9ee8e5f120 at ic…> …) In guix/build/syscalls.scm: 2334:35 1 (_) 2323:8 0 (terminal-window-size _) guix/build/syscalls.scm:2323:8: In procedure terminal-window-size: In procedure terminal-window-size: Inappropriate ioctl for device * guix/ui.scm (display-hint): Pass PORT to ‘terminal-columns’. Change-Id: Ica0096aee5e6b2c19814ae5d71de9ffe9ab32430
-rw-r--r--guix/ui.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 447550635c..eba12c8616 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -341,7 +341,7 @@ other objects that must match the 'format' escapes in MESSAGE."
(display (colorize (G_ "hint: ")) port)
(display
;; XXX: We should arrange so that the initial indent is wider.
- (parameterize ((%text-width (max 15 (- (terminal-columns) 5))))
+ (parameterize ((%text-width (max 15 (- (terminal-columns port) 5))))
(texi->plain-text (match arguments
(() (format #f message))
(_ (apply format #f message