diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-05-28 21:43:44 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-05-28 21:43:44 +0200 |
commit | 421355dbd64ad33b815280a61b7f2e80bb2ec074 (patch) | |
tree | 2eb40bda8452fe3bb6b26c79cffbb80d6bd690a0 /src/common | |
parent | 28f152d2b8ab699f8174d47d84660309c90e2527 (diff) |
Check if stderr is a tty, not stdout
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/cerr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/cerr.c b/src/common/cerr.c index 98bca0f..a9df061 100644 --- a/src/common/cerr.c +++ b/src/common/cerr.c @@ -34,7 +34,7 @@ cerrinit(const char *s) const char *p = strrchr(s, '/'); progname = p ? p + 1 : s; - if (isatty(STDOUT_FILENO)) { + if (isatty(STDERR_FILENO)) { const char *ev = getenv("NO_COLOR"); color = !ev || !*ev; } |