summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-30 00:54:53 +0800
committerruki <[email protected]>2021-01-30 00:54:53 +0800
commitb4989e2b90851b5724e5511c8bab7a6f42ac2a76 (patch)
tree725e2912a2142892ef7d8c898a423bab4f921fc6
parent74e9ed083f9ff8110f3bad808179b1dd0f75d0bb (diff)
fix tty
-rwxr-xr-xtests/projects/package/toolchain_zig/src/main.c7
-rw-r--r--tests/projects/package/toolchain_zig/xmake.lua7
-rw-r--r--xmake/core/base/tty.lua4
3 files changed, 16 insertions, 2 deletions
diff --git a/tests/projects/package/toolchain_zig/src/main.c b/tests/projects/package/toolchain_zig/src/main.c
new file mode 100755
index 000000000..9ae580511
--- /dev/null
+++ b/tests/projects/package/toolchain_zig/src/main.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main(int argc, char** argv)
+{
+ printf("hello world!\n");
+ return 0;
+}
diff --git a/tests/projects/package/toolchain_zig/xmake.lua b/tests/projects/package/toolchain_zig/xmake.lua
new file mode 100644
index 000000000..1c0721533
--- /dev/null
+++ b/tests/projects/package/toolchain_zig/xmake.lua
@@ -0,0 +1,7 @@
+add_rules("mode.debug", "mode.release")
+add_requires("zig 0.7.x")
+
+target("test")
+ set_kind("binary")
+ add_files("src/*.c")
+ set_toolchains("zig")
diff --git a/xmake/core/base/tty.lua b/xmake/core/base/tty.lua
index abaaf74f0..67b0a1fbf 100644
--- a/xmake/core/base/tty.lua
+++ b/xmake/core/base/tty.lua
@@ -205,8 +205,8 @@ function tty.has_emoji()
local term = tty.term()
local winos = require("base/winos")
- -- before win7 on cmd? disable it
- if has_emoji == nil and winos.version():le("win7") then
+ -- before win7? disable it
+ if has_emoji == nil and (os.host() == "windows" and winos.version():le("win7")) then
has_emoji = false
end