From c5d5e3b16f720b0d0945af0237d0bc1fd6b3f82d Mon Sep 17 00:00:00 2001 From: Saikari Date: Thu, 29 Jan 2026 06:39:34 +0300 Subject: Enhance os.isexec function to support .sh files as executable extensions --- xmake/core/base/os.lua | 4 ++-- 1 file 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 -- cgit v1.3.1