summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaikari <[email protected]>2026-02-17 23:00:28 +0300
committerSaikari <[email protected]>2026-02-17 23:00:28 +0300
commit05ebd2e41e28a1ef4cb3184e822a44063fcc63e2 (patch)
treea4d6be7059d42300a650023ef0a2185f58a199b8
parent3774d82b0004a7adca704ab2de70c65270bf92b7 (diff)
revert ok, errors = sandbox.load(opt.check, program)
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_program.lua10
1 files changed, 1 insertions, 9 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
index a5909abdd..288a9089e 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
@@ -64,15 +64,7 @@ function sandbox_lib_detect_find_program._do_check(program, opt)
elseif type(opt.check) == "table" then
ok, errors = os.runv(program, opt.check, {envs = opt.envs, shell = opt.shell})
else
- local ok_or_errors
- ok, ok_or_errors = sandbox.load(opt.check, program)
- if ok then
- if ok_or_errors ~= nil then
- ok = ok_or_errors
- end
- else
- errors = ok_or_errors
- end
+ ok, errors = sandbox.load(opt.check, program)
end
-- check failed? print verbose error info