From 3bae42aa5ada633d8842ac1b172335430110f751 Mon Sep 17 00:00:00 2001 From: clippered Date: Wed, 1 Nov 2017 23:45:35 +1100 Subject: [PATCH] fix output panics on unable to write to stderr --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index cd9e19171db4..6be778a52628 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -575,7 +575,9 @@ pub fn run(input: Input, config: &Config) -> Summary { if report.has_warnings() { match term::stderr() { - Some(ref t) if isatty() && t.supports_color() => { + Some(ref t) + if isatty() && t.supports_color() && t.supports_attr(term::Attr::Bold) => + { match report.print_warnings_fancy(term::stderr().unwrap()) { Ok(..) => (), Err(..) => panic!("Unable to write to stderr: {}", report),