diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-06-14 11:46:17 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-06-14 15:34:38 +0200 |
commit | e66f243e929bbd94e62e77cfa6a63dfd001ebe07 (patch) | |
tree | 246ca8d1f9eec6bdf14083ff73c48e322d03e2e7 | |
parent | 4f6e6c0442368ac3fd7e95f1fc264671d9182c00 (diff) | |
download | guix-e66f243e929bbd94e62e77cfa6a63dfd001ebe07.tar.gz guix-e66f243e929bbd94e62e77cfa6a63dfd001ebe07.zip |
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.
-rw-r--r-- | guix/ui.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/ui.scm b/guix/ui.scm index 98b30445c8..7690f48660 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1562,9 +1562,9 @@ zero means that PACKAGE does not match any of REGEXPS." (if (isatty?* (current-output-port)) ;; Set 'LESS' so that 'less' exits if everything fits on the screen (F), ;; lets ANSI escapes through (r), does not send the termcap - ;; initialization string (X). - (let ((pager (with-environment-variables `(("LESS" - ,(or (getenv "LESS") "FrX"))) + ;; initialization string (X). Set it unconditionally because some + ;; distros set it to something that doesn't work here. + (let ((pager (with-environment-variables `(("LESS" "FrX")) (open-pipe* OPEN_WRITE (or (getenv "GUIX_PAGER") (getenv "PAGER") "less"))))) |