summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/core/tools/clang_cl.lua2
-rw-r--r--xmake/modules/core/tools/gcc.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua
index 0a934576a..22a28f20c 100644
--- a/xmake/modules/core/tools/clang_cl.lua
+++ b/xmake/modules/core/tools/clang_cl.lua
@@ -66,7 +66,7 @@ end
function _has_color_diagnostics(self)
local colors_diagnostics = _g._HAS_COLOR_DIAGNOSTICS
if colors_diagnostics == nil then
- if io.isatty() and (tty.has_color8() or colors.color256()) then
+ if io.isatty() and (tty.has_color8() or tty.has_color256()) then
local theme = colors.theme()
if theme and theme:name() ~= "plain" then
-- for clang
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index bbe3f0333..4be53c113 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -361,7 +361,7 @@ end
function _has_color_diagnostics(self)
local colors_diagnostics = _g._HAS_COLOR_DIAGNOSTICS
if colors_diagnostics == nil then
- if io.isatty() and (tty.has_color8() or colors.color256()) then
+ if io.isatty() and (tty.has_color8() or tty.has_color256()) then
local theme = colors.theme()
if theme and theme:name() ~= "plain" then
-- for gcc