diff options
| author | ruki <[email protected]> | 2021-01-28 00:46:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-01-28 00:46:05 +0800 |
| commit | d98169322f86c2a95d6b4e62a56918414fa1349d (patch) | |
| tree | 5ea4db29ed63dd0640bc8274ce35f977e3c8e43a /xmake/modules/core | |
| parent | a1728044cfcdd69080fc34c7e51d1cc4917e25a1 (diff) | |
add tty.has_color8
Diffstat (limited to 'xmake/modules/core')
| -rw-r--r-- | xmake/modules/core/tools/clang_cl.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua index 26ad13184..0a934576a 100644 --- a/xmake/modules/core/tools/clang_cl.lua +++ b/xmake/modules/core/tools/clang_cl.lua @@ -21,6 +21,7 @@ -- inherit cl inherit("cl") import("core.base.option") +import("core.base.tty") import("core.base.colors") -- init it @@ -65,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 (colors.color8() or colors.color256()) then + if io.isatty() and (tty.has_color8() or colors.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 e945e2926..bbe3f0333 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -20,6 +20,7 @@ -- imports import("core.base.option") +import("core.base.tty") import("core.base.colors") import("core.base.global") import("core.project.config") @@ -360,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 (colors.color8() or colors.color256()) then + if io.isatty() and (tty.has_color8() or colors.color256()) then local theme = colors.theme() if theme and theme:name() ~= "plain" then -- for gcc |
