Commit graph

9 commits

Author SHA1 Message Date
Nick Cameron
5305bc8436 test fallout 2017-03-28 11:25:59 +13:00
Nick Cameron
5fb1140688 fallout - source reformatting 2017-03-28 11:14:47 +13:00
Kamal Marhubi
05882314f5 Check term supports colour before printing fancy diffs
For a terminal like DUMB, we were still attempting to print colourful
diffs, which failed with a `NotSupported` error.

Fixes #1140
2016-08-26 17:08:47 -04:00
Kamal Marhubi
9759068e62 print_diff: Don't print color codes if output is not a tty
On unix, `term::stdout()` just reads the `TERM` environment variable to
decide what features are available. It does not check if the output file
descriptor is in fact a tty. This resulted in printing escape codes when
redirecting output.
2016-05-31 15:15:33 +02:00
Nick Cameron
d0720a00a1 Fall back to basic stdout if we can't unwrap a fancy terminal (#995)
fixes #978
2016-05-17 23:25:57 +02:00
Sinh Pham
122fc4bc65 Fixed #700, use default color for titles and context in write-mode=diff 2016-01-01 09:14:39 -08:00
Utkarsh Kukreti
15e6b7d335 Add tests for #606. 2015-12-28 17:23:34 +05:30
Nick Cameron
617eed353c Changes to rustfmt source 2015-09-26 18:29:48 +12:00
Sinh Pham
e7a5f9327e Add diff write mode https://github.com/nrc/rustfmt/issues/261 2015-09-10 18:30:07 -04:00