diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-08-10 16:02:42 -0700 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-08-10 16:07:21 -0700 |
commit | 292567e0b0a4681eb8ca803c26293d70857fe387 (patch) | |
tree | 9ab98e53bafb1b91bcf41fe3b335d2a2568fb3ca /src/nix/main.cc | |
parent | 3775b6ac88720ab10237bab4817313c920daffcb (diff) |
fix: check if it is a Real terminal, not just if it is a terminal
This will stop printing stuff to dumb terminals that they don't support.
I've overall audited usage of isatty and replaced the ones with intent
to mean "is a Real terminal" with checking for that. I've also caught a
case of carelessly assuming "is a tty" means "should be colour" in
nix-env.
Change-Id: I6d83725d9a2d932ac94ff2294f92c0a1100d23c9
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r-- | src/nix/main.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc index 1c1e9df7e..9cbe303ac 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -362,6 +362,7 @@ void mainWrapped(int argc, char * * argv) setLogFormat(LogFormat::bar); Finally f([] { logger->pause(); }); settings.verboseBuild = false; + // FIXME: stop messing about with log verbosity depending on if it is interactive use if (isatty(STDERR_FILENO)) { verbosity = lvlNotice; } else { |