summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/make.lua
diff options
context:
space:
mode:
authorChan Lee <[email protected]>2024-12-28 20:56:14 +0800
committerChan Lee <[email protected]>2024-12-28 20:56:14 +0800
commit7f3f5b55c298e4402e50d3f323bfad4cd405ca43 (patch)
treec5b912f1932314683061aa6b8b187c219611b33d /xmake/modules/package/tools/make.lua
parent4f408ebd0c944fecb9777c5b07ec57af1f5798b2 (diff)
zig cc: fix wrapper in Git Bash
Diffstat (limited to 'xmake/modules/package/tools/make.lua')
-rw-r--r--xmake/modules/package/tools/make.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/make.lua b/xmake/modules/package/tools/make.lua
index 9399fa900..cec1361ad 100644
--- a/xmake/modules/package/tools/make.lua
+++ b/xmake/modules/package/tools/make.lua
@@ -27,7 +27,12 @@ import("private.utils.toolchain", {alias = "toolchain_utils"})
-- translate bin path
function _translate_bin_path(bin_path)
if is_host("windows") and bin_path then
- return bin_path:gsub("\\", "/") .. ".exe"
+ bin_path = bin_path:gsub("\\", "/")
+ local bin_path_lower = bin_path:lower()
+ if not bin_path_lower:endswith(".exe") and not bin_path_lower:endswith(".cmd") and not bin_path_lower:endswith(".bat") then
+ bin_path = bin_path .. ".exe"
+ end
+ return bin_path
end
return bin_path
end