Show build and substitution information when not connected to a TTY
When stderr is not connected to a tty, show "building" and "substituting" messages, a-la nix-build et al. Closes https://github.com/NixOS/nix/issues/4402 Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
This commit is contained in:
parent
5e9653c370
commit
8cf54f754d
1 changed files with 6 additions and 2 deletions
|
@ -270,11 +270,15 @@ void mainWrapped(int argc, char * * argv)
|
||||||
if (legacy) return legacy(argc, argv);
|
if (legacy) return legacy(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
verbosity = lvlNotice;
|
|
||||||
settings.verboseBuild = false;
|
|
||||||
evalSettings.pureEval = true;
|
evalSettings.pureEval = true;
|
||||||
|
|
||||||
setLogFormat("bar");
|
setLogFormat("bar");
|
||||||
|
settings.verboseBuild = false;
|
||||||
|
if (isatty(STDERR_FILENO)) {
|
||||||
|
verbosity = lvlNotice;
|
||||||
|
} else {
|
||||||
|
verbosity = lvlInfo;
|
||||||
|
}
|
||||||
|
|
||||||
Finally f([] { logger->stop(); });
|
Finally f([] { logger->stop(); });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue