Skip to content

ProgressStyle enable/disable colors based on draw target#699

Merged
djc merged 3 commits intoconsole-rs:mainfrom
tonywu6:feat/progressstyle-color-stderr
Mar 24, 2025
Merged

ProgressStyle enable/disable colors based on draw target#699
djc merged 3 commits intoconsole-rs:mainfrom
tonywu6:feat/progressstyle-color-stderr

Conversation

@tonywu6
Copy link
Contributor

@tonywu6 tonywu6 commented Mar 21, 2025

Resolves #698

A ProgressBar using stderr as the draw target will now implicitly use stderr to determine if colors are enabled (by configuring its ProgressStyle).

Previously, this was not configured, so the default behavior was to detect colors using stdout no matter what.

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

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

Thanks, this looks like a nice improvement!

@tonywu6 tonywu6 requested a review from djc March 24, 2025 12:15
@djc djc merged commit 458e4dc into console-rs:main Mar 24, 2025
10 checks passed
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.

[Feature Request] ProgressStyle: enable/disable colorized output based on draw target

2 participants