File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ use std::sync::OnceLock;
26
26
use std:: time:: SystemTime ;
27
27
use std:: { env, io, str} ;
28
28
29
- use build_helper:: ci:: gha;
29
+ use build_helper:: ci:: { gha, CiEnv } ;
30
30
use build_helper:: exit;
31
31
use sha2:: digest:: Digest ;
32
32
use termcolor:: { ColorChoice , StandardStream , WriteColor } ;
@@ -1882,7 +1882,9 @@ to download LLVM rather than building it.
1882
1882
let choice = match self . config . color {
1883
1883
flags:: Color :: Always => ColorChoice :: Always ,
1884
1884
flags:: Color :: Never => ColorChoice :: Never ,
1885
- flags:: Color :: Auto if !is_tty => ColorChoice :: Never ,
1885
+ // GitHub Actions does not report itself as a tty session however having colored output
1886
+ // there is still useful for visually parsing logs.
1887
+ flags:: Color :: Auto if !is_tty && !CiEnv :: is_ci ( ) => ColorChoice :: Never ,
1886
1888
flags:: Color :: Auto => ColorChoice :: Auto ,
1887
1889
} ;
1888
1890
let mut stream = constructor ( choice) ;
You can’t perform that action at this time.
0 commit comments