Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imply -q when stderr is not a tty #2884

Merged
merged 4 commits into from
Dec 7, 2021
Merged

Conversation

binhdvo
Copy link
Contributor

@binhdvo binhdvo commented Nov 29, 2021

This avoids progress bar updates when inappropriate for stderr, to address #2816

programs/zstdcli.c Outdated Show resolved Hide resolved
@senhuang42
Copy link
Contributor

The tests that fail here seem to be related to PR #2322. Changing the g_displayLevel is unfortunately fraught and the mechanisms for deciding what should be displayed are convoluted - if the tests failures are not descriptive enough, there's a good amount of discussion in #2322 for what the intended behavior should be, which might help with determining the correct fix for this.

@terrelln
Copy link
Contributor

We should do this in the same place we handle quieting for stdout:

if (hasStdout && (g_displayLevel==2)) g_displayLevel=1;

I'm not sure if it would be better to move the stdout one up, or this one down though.

Copy link
Contributor

@Cyan4973 Cyan4973 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-q implies disabling user prompt.
The existing displayLevel cutoff thresholds are correct.

programs/fileio.c Outdated Show resolved Hide resolved
@binhdvo binhdvo merged commit 38dfc46 into facebook:dev Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants