forked from lix-project/lix
Stop the logger in legacy commands again
Commit0dd1d8ca1c
included an accidental revert of1461e6cdda
(actually slightly worse), leading to the progress bar not being stopped properly when a legacy command was invoked with `--log-format bar` (or similar options that show a progress bar). Move the progress bar stopping code to its proper place again to fix this regression. Change-Id:I676333da096d5990b717a387924bb988c9b73fab
This commit is contained in:
parent
e38410799b
commit
de552c42cb
|
@ -353,6 +353,9 @@ void mainWrapped(int argc, char * * argv)
|
|||
argv++; argc--;
|
||||
}
|
||||
|
||||
// Clean up the progress bar if shown using --log-format in a legacy command too.
|
||||
// Otherwise, this is a harmless no-op.
|
||||
Finally f([] { logger->pause(); });
|
||||
{
|
||||
auto legacy = (*RegisterLegacyCommand::commands)[programName];
|
||||
if (legacy) return legacy(argc, argv);
|
||||
|
@ -361,7 +364,6 @@ void mainWrapped(int argc, char * * argv)
|
|||
evalSettings.pureEval = true;
|
||||
|
||||
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)) {
|
||||
|
|
Loading…
Reference in a new issue