summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-11-01 00:19:37 +0800
committerruki <[email protected]>2017-10-31 19:57:43 +0800
commit2e71d91653126f1a1c74c6e6fb157f5943b051e4 (patch)
tree502f877c280d3f463904a56f4462cf8b90ee8e37
parente55029da7c858b81beb6f79988afc888baca72da (diff)
disable isatty detect for colors output
-rw-r--r--xmake/core/base/colors.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/xmake/core/base/colors.lua b/xmake/core/base/colors.lua
index ca2113f74..bd0c4bd69 100644
--- a/xmake/core/base/colors.lua
+++ b/xmake/core/base/colors.lua
@@ -205,7 +205,7 @@ end
--
-- "${beer}hello${beer}world"
--
-function colors.translate(str, force)
+function colors.translate(str)
-- check string
if not str then
@@ -218,11 +218,6 @@ function colors.translate(str, force)
-- translate it
str = string.gsub(str, "(%${(.-)})", function(_, word)
- -- ignore all colors if no tty (redirect ..)
- if not force and not io.isatty() then
- return ""
- end
-
-- not supported? ignore it
if not colors.has256() and not colors.truecolor() then
return ""