Skip to content

Commit

Permalink
Better handling for HXCPP_COLOR.
Browse files Browse the repository at this point in the history
  • Loading branch information
MAJigsaw77 committed Sep 2, 2024
1 parent 43c0cdc commit 95c69a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion tools/hxcpp/BuildTool.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1539,8 +1539,11 @@ class BuildTool
}


if (defines.exists("HXCPP_NO_COLOUR") || defines.exists("HXCPP_NO_COLOR"))
if (Sys.getEnv("HXCPP_COLOUR") != null || Sys.getEnv("HXCPP_COLOR") != null)
Log.colorSupported = !(defines.exists("HXCPP_NO_COLOUR") || defines.exists("HXCPP_NO_COLOR"));
else if (defines.exists("HXCPP_NO_COLOUR") || defines.exists("HXCPP_NO_COLOR"))
Log.colorSupported = false;

Log.verbose = defines.exists("HXCPP_VERBOSE");
exitOnThreadError = defines.exists("HXCPP_EXIT_ON_ERROR");

Expand Down
3 changes: 0 additions & 3 deletions tools/hxcpp/Log.hx
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ class Log
}
else
{
if (Sys.getEnv('HXCPP_COLOR') != null)
colorSupported = true;

if (colorSupported != true && term != null)
{
colorSupported = ~/(?i)-256(color)?$/.match(term)
Expand Down

0 comments on commit 95c69a2

Please sign in to comment.