File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 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;
2626use std:: time:: SystemTime ;
2727use std:: { env, io, str} ;
2828
29- use build_helper:: ci:: gha;
29+ use build_helper:: ci:: { gha, CiEnv } ;
3030use build_helper:: exit;
3131use sha2:: digest:: Digest ;
3232use termcolor:: { ColorChoice , StandardStream , WriteColor } ;
@@ -1882,7 +1882,9 @@ to download LLVM rather than building it.
18821882 let choice = match self . config . color {
18831883 flags:: Color :: Always => ColorChoice :: Always ,
18841884 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 ,
18861888 flags:: Color :: Auto => ColorChoice :: Auto ,
18871889 } ;
18881890 let mut stream = constructor ( choice) ;
You can’t perform that action at this time.
0 commit comments