Skip to content

Commit 3bae42a

Browse files
committed
fix output panics on unable to write to stderr
1 parent 0af8825 commit 3bae42a

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)