summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/os.lua6
1 files 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