1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-08 17:22:10 +03:00

change logic when stderr is not console : don't update progress status

but keep warnings and final operation statement.

updated tests/cli-tests/ accordingly
This commit is contained in:
Yann Collet
2023-01-26 11:43:27 -08:00
parent 3c215220e3
commit 82ca00811a
10 changed files with 83 additions and 66 deletions

View File

@@ -1500,9 +1500,8 @@ int main(int argCount, const char* argv[])
hasStdout = outFileName && !strcmp(outFileName,stdoutmark);
if (hasStdout && (g_displayLevel==2)) g_displayLevel=1;
/* when stderr is not the console, do not pollute it with status updates
* Note : the below code actually also silence more stuff, including completion report. */
if (!UTIL_isConsole(stderr) && (g_displayLevel==2)) g_displayLevel=1;
/* when stderr is not the console, do not pollute it with progress updates (unless requested) */
if (!UTIL_isConsole(stderr) && (progress!=FIO_ps_always)) progress=FIO_ps_never;
FIO_setProgressSetting(progress);
/* don't remove source files when output is stdout */;