summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaikari <[email protected]>2026-01-29 06:39:34 +0300
committerSaikari <[email protected]>2026-01-29 06:39:34 +0300
commitc5d5e3b16f720b0d0945af0237d0bc1fd6b3f82d (patch)
treee8ffed3d2e0d94e65c5427195b7334a562e195b7
parent811e01056c87441bca635db93107fc3531092818 (diff)
Enhance os.isexec function to support .sh files as executable extensions
-rw-r--r--xmake/core/base/os.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index 3ea77c9a9..3efff97fe 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -1158,7 +1158,7 @@ function os.isexec(filepath)
if os.isfile(filepath) then
if os.host() == "windows" then
local ext = path.extension(filepath):lower()
- if ext == ".exe" or ext == ".cmd" or ext == ".bat" or ext == ".ps1" then
+ if ext == ".exe" or ext == ".cmd" or ext == ".bat" or ext == ".ps1" or ext == ".sh" then
return true
end
else
@@ -1166,7 +1166,7 @@ function os.isexec(filepath)
end
end
if os.host() == "windows" then
- for _, suffix in ipairs({".exe", ".cmd", ".bat", ".ps1"}) do
+ for _, suffix in ipairs({".exe", ".cmd", ".bat", ".ps1", ".sh"}) do
if os.isfile(filepath .. suffix) then
return true
end