summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/find_python3.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/detect/tools/find_python3.lua')
-rw-r--r--xmake/modules/detect/tools/find_python3.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/find_python3.lua b/xmake/modules/detect/tools/find_python3.lua
index 0e056dd27..3b606f279 100644
--- a/xmake/modules/detect/tools/find_python3.lua
+++ b/xmake/modules/detect/tools/find_python3.lua
@@ -43,7 +43,7 @@ function main(opt)
opt.paths = opt.paths or {}
local keys = winos.registry_keys("HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.*\\InstallPath")
for _, key in ipairs(keys) do
- local value = winos.registry_query(key .. ";ExecutablePath")
+ local value = try {function () return winos.registry_query(key .. ";ExecutablePath") end}
if value and os.isfile(value) then
table.insert(opt.paths, value)
end