From 94c655f43fe2141e0e6d187602ae88b8c3fa6e10 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 12 Apr 2021 23:58:17 +0800 Subject: improve find_python --- xmake/modules/detect/tools/find_python3.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmake/modules/detect/tools/find_python3.lua') 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 -- cgit v1.3.1