1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 05:01:48 +02:00

treewide: shouldANSI() -> isTTY()

This commit is contained in:
Ivan Shapovalov 2024-03-01 23:13:00 +01:00
parent d9fc4bf5c5
commit 8c1eeb4681
8 changed files with 8 additions and 8 deletions

View file

@ -52,7 +52,7 @@ public:
: printBuildLogs(printBuildLogs)
{
systemd = getEnv("IN_SYSTEMD") == "1";
tty = shouldANSI();
tty = isTTY();
}
bool isVerbose() override {

View file

@ -7,7 +7,7 @@
namespace nix {
bool shouldANSI()
bool isTTY()
{
return isatty(STDERR_FILENO)
&& getEnv("TERM").value_or("dumb") != "dumb"

View file

@ -8,7 +8,7 @@ namespace nix {
* Determine whether ANSI escape sequences are appropriate for the
* present output.
*/
bool shouldANSI();
bool isTTY();
/**
* Truncate a string to 'width' printable characters. If 'filterAll'