Merge pull request #2106 from clippered/fix-panic-on-windows-stderr
fix output panics on unable to write to stderr
This commit is contained in:
commit
be959667c1
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user