summaryrefslogtreecommitdiff
path: root/src/pager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pager.c')
-rw-r--r--src/pager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pager.c b/src/pager.c
index 6ea25ada65..be284da962 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -39,13 +39,13 @@ void pager_open(void) {
if (pager_pid > 0)
return;
- if (isatty(STDOUT_FILENO) <= 0)
- return;
-
if ((pager = getenv("SYSTEMD_PAGER")) || (pager = getenv("PAGER")))
if (!*pager || streq(pager, "cat"))
return;
+ if (isatty(STDOUT_FILENO) <= 0)
+ return;
+
/* Determine and cache number of columns before we spawn the
* pager so that we get the value from the actual tty */
columns();