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

By default, only report progress when stderr is a terminal #283

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

th1000s
Copy link
Contributor

@th1000s th1000s commented Jan 14, 2025

Can be overridden by --progress=[true/false/auto]. Previous
option --quiet hidden, but kept for compatibility.


Avoids getting mailed or logging a bunch of [<===> ] lines. Also contains two clippy fix commits for v1.84.

Comment on lines +752 to +755
/// Override progress reporting, by default (=auto) only report when stderr is a terminal.
/// Possible values: true, false, auto.
#[arg(long, value_name = "VAL", require_equals = true,
value_parser(["auto", "true", "false"]), default_value = "auto",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about also adding default_missing_value = "true", num_args = 0..=1, so that --progress == --progress=true, but that would make the help text even longer and harder to understand. And a value parser to convert "true" etc. is also possible, but that makes the argparse logic more complex than the simple thing which it toggles.

Can be overridden by --progress=[true/false/auto]. Previous
option --quiet hidden, but kept for compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant