summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/os.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index a752b7a42..8a9cde4cd 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -1156,7 +1156,18 @@ function os.isexec(filepath)
-- check executable program exist
if os.isfile(filepath) then
- return os._access(filepath, "x")
+ if os.host() == "windows" then
+ return true
+ else
+ return os._access(filepath, "x")
+ end
+ end
+ if os.host() == "windows" then
+ for _, suffix in ipairs({".exe", ".cmd", ".bat"}) do
+ if os.isfile(filepath .. suffix) then
+ return true
+ end
+ end
end
return false
end