From e299709deb2b8b90aaecdaf61584415a951530f5 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 30 Jan 2026 22:44:09 +0800 Subject: improve os.isexec --- xmake/core/base/os.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index c3a48b561..24e055eb9 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -1149,14 +1149,12 @@ end -- is executable program file? function os.isexec(filepath) - assert(filepath) - if os.host() == "windows" then local exts = {".exe", ".com", ".cmd", ".bat", ".ps1", ".sh"} if os.isfile(filepath) then - local extension = path.extension(filepath):lower() + local extension = path.extension(filepath) if extension and #extension > 0 then - if table.contains(exts, extension) then + if table.contains(exts, extension:lower()) then return true end else -- cgit v1.3.1