Skip to content

Commit 54bc2d2

Browse files
committed
improve find_program
1 parent d4da094 commit 54bc2d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

xmake/core/sandbox/modules/import/lib/detect/find_program.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ end
178178
-- find program
179179
function sandbox_lib_detect_find_program._find(name, paths, opt)
180180

181+
-- valid program file?
182+
if path.is_absolute(name) and os.isfile(name) then
183+
return name
184+
end
185+
181186
-- attempt to find it from the given directories
182187
local program_path = sandbox_lib_detect_find_program._find_from_paths(name, paths, opt)
183188
if program_path and opt.system ~= false then

0 commit comments

Comments
 (0)