summaryrefslogtreecommitdiff
path: root/xmake/modules/net/proxy.lua
diff options
context:
space:
mode:
authorSineStriker <[email protected]>2025-04-16 17:46:17 +0800
committerSineStriker <[email protected]>2025-04-16 17:46:17 +0800
commitc3aec74e5815cf2a260b68f7b0fddef749a19b4d (patch)
tree7356df3ed362f0495970fd50838bd532153f8565 /xmake/modules/net/proxy.lua
parentc9367898274ef8805ce79ebb4e24ab69a8a01133 (diff)
Optimize Code
Diffstat (limited to 'xmake/modules/net/proxy.lua')
-rw-r--r--xmake/modules/net/proxy.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/net/proxy.lua b/xmake/modules/net/proxy.lua
index bc00ce655..f473e3068 100644
--- a/xmake/modules/net/proxy.lua
+++ b/xmake/modules/net/proxy.lua
@@ -109,7 +109,7 @@ function _system_proxy()
return proxy
end
- if os.host() == "windows" then
+ if is_host("windows") then
-- Check whether system proxy is enabled
local proxy_enable = winos.registry_query('HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings;ProxyEnable')
-- Verify that the proxy is enabled (0x1 means enabled)
@@ -136,7 +136,7 @@ end
-- translate global proxy
function _global_proxy()
local proxy = global.get("proxy")
- if proxy and string.lower(proxy) == "system" then
+ if proxy and proxy:lower() == "system" then
return _system_proxy()
end
return proxy