For a terminal like DUMB, we were still attempting to print colourful
diffs, which failed with a `NotSupported` error.
Fixes #1140
where F: Fn(u32) -> String
{
match term::stdout() {
- Some(_) if isatty() => print_diff_fancy(diff, get_section_title, term::stdout().unwrap()),
+ Some(ref t) if isatty() && t.supports_color() => {
+ print_diff_fancy(diff, get_section_title, term::stdout().unwrap())
+ }
_ => print_diff_basic(diff, get_section_title),
}