mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-11 23:50:33 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user