Skip to content

Commit be95966

Browse files
authored
Merge pull request #2106 from clippered/fix-panic-on-windows-stderr
fix output panics on unable to write to stderr
2 parents 580c96b + 3bae42a commit be95966

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,9 @@ pub fn run(input: Input, config: &Config) -> Summary {
575575

576576
if report.has_warnings() {
577577
match term::stderr() {
578-
Some(ref t) if isatty() && t.supports_color() => {
578+
Some(ref t)
579+
if isatty() && t.supports_color() && t.supports_attr(term::Attr::Bold) =>
580+
{
579581
match report.print_warnings_fancy(term::stderr().unwrap()) {
580582
Ok(..) => (),
581583
Err(..) => panic!("Unable to write to stderr: {}", report),

0 commit comments

Comments
 (0)