Skip to content

Commit 3d30904

Browse files
committed
Better handling for HXCPP_COLOR.
1 parent e507f0b commit 3d30904

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tools/hxcpp/BuildTool.hx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,8 +1603,11 @@ class BuildTool
16031603
}
16041604

16051605

1606-
if (defines.exists("HXCPP_NO_COLOUR") || defines.exists("HXCPP_NO_COLOR"))
1606+
if (Sys.getEnv("HXCPP_COLOUR") != null || Sys.getEnv("HXCPP_COLOR") != null)
1607+
Log.colorSupported = !(defines.exists("HXCPP_NO_COLOUR") || defines.exists("HXCPP_NO_COLOR"));
1608+
else if (defines.exists("HXCPP_NO_COLOUR") || defines.exists("HXCPP_NO_COLOR"))
16071609
Log.colorSupported = false;
1610+
16081611
Log.verbose = defines.exists("HXCPP_VERBOSE");
16091612
Log.showSetup = defines.exists("HXCPP_LOG_SETUP");
16101613
exitOnThreadError = defines.exists("HXCPP_EXIT_ON_ERROR");

tools/hxcpp/Log.hx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@ class Log
143143
}
144144
else
145145
{
146-
if (Sys.getEnv('HXCPP_COLOR') != null)
147-
colorSupported = true;
148-
149146
if (colorSupported != true && term != null)
150147
{
151148
colorSupported = ~/(?i)-256(color)?$/.match(term)

0 commit comments

Comments
 (0)