summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-11-26 08:01:30 +0800
committerGitHub <[email protected]>2021-11-26 08:01:30 +0800
commit7be0259a5187143abf2ae798ff0ca5720c15dc3d (patch)
tree8a80975189f85e7af26dd1168d39d1a0a5a10886
parente2e14bba2335d9ea0a1de60a318c21efa4d067ef (diff)
Update main.lua
-rw-r--r--xmake/actions/update/main.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua
index 7437606fa..94ea1b7aa 100644
--- a/xmake/actions/update/main.lua
+++ b/xmake/actions/update/main.lua
@@ -158,6 +158,7 @@ function _install(sourcedir)
if os.isfile(win_installer_name) then
-- /D sets the default installation directory ($INSTDIR), overriding InstallDir and InstallDirRegKey. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. Only absolute paths are supported.
local params = ("/D=" .. os.programdir()):split("%s", { strict = true })
+ -- @see https://github.com/xmake-io/xmake/issues/1576
local no_admin = try {function () return winos.registry_query("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\XMake;NoAdmin") end}
if no_admin == nil then
no_admin = try {function () return winos.registry_query("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\XMake;NoAdmin") end}