Skip to content

Commit 064dbb9

Browse files
committed
auto merge of #14571 : bnoordhuis/rust/libtest-check-isatty, r=alexcrichton
Fixes #14570.
2 parents 4e0b936 + 87ecd4f commit 064dbb9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libtest/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,9 @@ fn should_sort_failures_before_printing_them() {
868868
assert!(apos < bpos);
869869
}
870870

871-
fn use_color() -> bool { return get_concurrency() == 1; }
871+
fn use_color() -> bool {
872+
get_concurrency() == 1 && io::stdout().get_ref().isatty()
873+
}
872874

873875
#[deriving(Clone)]
874876
enum TestEvent {

0 commit comments

Comments
 (0)