ui: Set 'LESS' environment variable unconditionally.
Fixes <https://bugs.gnu.org/41811>. Reported by Lars-Dominik Braun <lars@6xq.net>. * guix/ui.scm (call-with-paginated-output-port): Remove (getenv "LESS") call.master
parent
4f6e6c0442
commit
e66f243e92
|
@ -1562,9 +1562,9 @@ zero means that PACKAGE does not match any of REGEXPS."
|
||||||
(if (isatty?* (current-output-port))
|
(if (isatty?* (current-output-port))
|
||||||
;; Set 'LESS' so that 'less' exits if everything fits on the screen (F),
|
;; Set 'LESS' so that 'less' exits if everything fits on the screen (F),
|
||||||
;; lets ANSI escapes through (r), does not send the termcap
|
;; lets ANSI escapes through (r), does not send the termcap
|
||||||
;; initialization string (X).
|
;; initialization string (X). Set it unconditionally because some
|
||||||
(let ((pager (with-environment-variables `(("LESS"
|
;; distros set it to something that doesn't work here.
|
||||||
,(or (getenv "LESS") "FrX")))
|
(let ((pager (with-environment-variables `(("LESS" "FrX"))
|
||||||
(open-pipe* OPEN_WRITE
|
(open-pipe* OPEN_WRITE
|
||||||
(or (getenv "GUIX_PAGER") (getenv "PAGER")
|
(or (getenv "GUIX_PAGER") (getenv "PAGER")
|
||||||
"less")))))
|
"less")))))
|
||||||
|
|
Reference in New Issue