Skip to content

Only print colored error messages if the output is going to the screen #3035

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

Closed
wants to merge 3 commits into from
Closed

Conversation

dgryski
Copy link
Contributor

@dgryski dgryski commented Jul 26, 2012

Most tools print color if isatty() returns true. This patch adds an io::writer.get_type() method that gives hints as to the underlying writer type. The diagnostics code then uses this to determine if it should print in colour or not.

@ghost ghost assigned catamorphism Jul 26, 2012
@catamorphism
Copy link
Contributor

I'll merge this -- there's just one tiny change I want to make.

@catamorphism
Copy link
Contributor

Merged, thanks! I changed two places in the code to return implicitly rather than with a ret but otherwise, looks good.

bors pushed a commit to rust-lang-ci/rust that referenced this pull request May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Aug 22, 2023
bump serde

bump to a version with the binary blob removed

also, respect CARGO_EXTRA_FLAGS in more places
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.

2 participants