summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-07 00:52:53 +0800
committerruki <[email protected]>2024-02-07 00:52:53 +0800
commit136350b6422b1dee9ae599c44e866bc1b2a18e39 (patch)
treef83f309093baedff85a50f7a562c0d878d15cde9
parentb68a8beb9baba778d2d467863fd41120dfa31bb2 (diff)
fix os.execv and update tbox
m---------core/src/tbox/tbox0
-rw-r--r--xmake/core/base/os.lua6
2 files changed, 3 insertions, 3 deletions
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox
-Subproject 48091613ea382454b24a28fc5ff11a6ca0250fd
+Subproject 3b4b1d200738cc13c7219d153bbc779f755e363
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index 0cc3b4361..d6c18cef3 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -804,10 +804,10 @@ function os.execv(program, argv, opt)
local file = io.open(filename, 'r')
for line in file:lines() do
if line and line:startswith("#!") then
- -- we cannot run `/bin/sh` directly on msys2/cygwin
+ -- we cannot run `/bin/sh` directly on windows
-- because `/bin/sh` is not real file path, maybe we need to convert it.
- local subhost = os.subhost()
- if subhost == "msys" or subhost == "cygwin" then
+ local host = os.host()
+ if host == "windows" then
filename = "sh"
argv = table.join(shellfile, argv)
else