1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

treewide: replace usages of isatty(STDERR_FILENO) with shouldANSI()

This commit is contained in:
Ivan Shapovalov 2024-03-01 23:11:24 +01:00
parent 950b6401f9
commit d9fc4bf5c5
3 changed files with 8 additions and 3 deletions

View file

@ -16,6 +16,7 @@
#include "xml-writer.hh"
#include "legacy.hh"
#include "eval-settings.hh" // for defexpr
#include "terminal.hh"
#include <cerrno>
#include <ctime>
@ -1089,7 +1090,7 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs)
return;
}
bool tty = isatty(STDOUT_FILENO);
bool tty = shouldANSI();
RunPager pager;
Table table;