diff options
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/shared.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index a407c647f..018e34509 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -5,9 +5,9 @@ #include "signals.hh" #include "loggers.hh" #include "current-process.hh" +#include "terminal.hh" #include <algorithm> -#include <cctype> #include <exception> #include <iostream> @@ -347,7 +347,7 @@ int handleExceptions(const std::string & programName, std::function<void()> fun) RunPager::RunPager() { - if (!isatty(STDOUT_FILENO)) return; + if (!isOutputARealTerminal(StandardOutputStream::Stdout)) return; char * pager = getenv("NIX_PAGER"); if (!pager) pager = getenv("PAGER"); if (pager && ((std::string) pager == "" || (std::string) pager == "cat")) return; |