diff options
| author | Saikari <[email protected]> | 2026-01-29 09:31:35 +0300 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-01-29 09:31:35 +0300 |
| commit | 38a8b6998f5ef826725ed565b46d50f097840ed0 (patch) | |
| tree | 581ab14388d4913518a1e1aa8d62c2703d4e2043 | |
| parent | 435178d4a85f8852999a1f8793c506af436ebe84 (diff) | |
Enhance os.isexec function to support additional Windows executable suffixes
| -rw-r--r-- | xmake/core/base/os.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 726d64d39..6c4c1fa48 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -1162,6 +1162,13 @@ function os.isexec(filepath) return os._access(filepath, "x") end end + if os.host() == "windows" then + for _, suffix in ipairs({".exe", ".cmd", ".bat", ".ps1"}) do + if os.isfile(filepath .. suffix) then + return true + end + end + end return false end |
