File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,7 +136,6 @@ class Log
136136 if (colorSupported == null )
137137 {
138138 var term = Sys .getEnv (" TERM" );
139- var colorTerm = Sys .getEnv (" COLORTERM" );
140139
141140 if (term == " dumb" )
142141 {
@@ -166,32 +165,21 @@ class Log
166165 }
167166 }
168167
169- if (colorSupported != true )
168+ if (colorSupported != true && Sys . getEnv ( " CI_NAME " ) == " codeship " )
170169 {
171- if (Sys .getEnv (" CI_NAME" ) == " codeship" )
172- {
173- colorSupported = true ;
174- }
170+ colorSupported = true ;
175171 }
176172 }
177173
178- if (colorSupported != true )
174+ if (colorSupported != true && Sys . getEnv ( " TEAMCITY_VERSION " ) != null )
179175 {
180- if (Sys .getEnv (" TEAMCITY_VERSION" ) != null )
181- {
182- colorSupported = ~/ ^ 9\. (0* [1-9 ] \d * )\. | \d {2,} \. / .match (Sys .getEnv (" TEAMCITY_VERSION" ));
183- }
184- else if (colorTerm == " truecolor" )
185- {
186- colorSupported = true ;
187- }
176+ colorSupported = ~/ ^ 9\. (0* [1-9 ] \d * )\. | \d {2,} \. / .match (Sys .getEnv (" TEAMCITY_VERSION" ));
188177 }
189178
190- if (colorSupported != true )
179+ if (colorSupported != true && term != null )
191180 {
192181 colorSupported = ~/ (? i)-256(color)? $ / .match (term )
193- || ~/ (? i)^ screen| ^ xterm| ^ vt100| ^ vt220| ^ rxvt| color| ansi| cygwin| linux/ .match (term )
194- || (colorTerm != null );
182+ || ~/ (? i)^ screen| ^ xterm| ^ vt100| ^ vt220| ^ rxvt| color| ansi| cygwin| linux/ .match (term );
195183 }
196184
197185 if (colorSupported != true )
You can’t perform that action at this time.
0 commit comments