From 9c86aa7667c81d4e492d7418702ae50befdbd38b Mon Sep 17 00:00:00 2001 From: Saikari Date: Wed, 28 Jan 2026 17:52:49 +0300 Subject: Enhance os.isexec function to correctly identify Windows executable files --- xmake/core/base/os.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 8a9cde4cd..963a015c1 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -1157,7 +1157,10 @@ function os.isexec(filepath) -- check executable program exist if os.isfile(filepath) then if os.host() == "windows" then - return true + local ext = path.extension(filepath):lower() + if ext == ".exe" or ext == ".cmd" or ext == ".bat" then + return true + end else return os._access(filepath, "x") end -- cgit v1.3.1