File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,23 +189,19 @@ class Log
189189
190190 if (colorSupported != true )
191191 {
192- colorSupported = Sys .getEnv (" TERM_PROGRAM" ) == " iTerm.app" || Sys .getEnv (" TERM_PROGRAM" ) == " Apple_Terminal" ;
192+ colorSupported = ~/ (? i)-256(color)? $ / .match (term )
193+ || ~/ (? i)^ screen| ^ xterm| ^ vt100| ^ vt220| ^ rxvt| color| ansi| cygwin| linux/ .match (term )
194+ || (colorTerm != null );
193195 }
194196
195197 if (colorSupported != true )
196198 {
197- colorSupported = ~/ (? i)-256(color)? $ / .match (term );
198- }
199-
200- if (colorSupported != true )
201- {
202- colorSupported = ~/ (? i)^ screen| ^ xterm| ^ vt100| ^ vt220| ^ rxvt| color| ansi| cygwin| linux/ .match (term ) || (colorTerm != null );
203- }
204-
205- if (colorSupported != true )
206- {
207- colorSupported = Sys .getEnv (" COLORTERM" ) != null || Sys .getEnv (" ANSICON" ) != null || Sys .getEnv (" ConEmuANSI" ) != null
208- || Sys .getEnv (" WT_SESSION" ) != null || Sys .getEnv (" FORCE_COLOR" ) != null ;
199+ colorSupported = Sys .getEnv (" TERM_PROGRAM" ) == " iTerm.app"
200+ || Sys .getEnv (" TERM_PROGRAM" ) == " Apple_Terminal"
201+ || Sys .getEnv (" COLORTERM" ) != null
202+ || Sys .getEnv (" ANSICON" ) != null
203+ || Sys .getEnv (" ConEmuANSI" ) != null
204+ || Sys .getEnv (" WT_SESSION" ) != null ;
209205 }
210206 }
211207 }
You can’t perform that action at this time.
0 commit comments