diff options
| author | ruki <[email protected]> | 2026-02-09 23:15:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-02-09 23:15:14 +0800 |
| commit | ff21702cec1348b5ae84526210650bdfd356f4dd (patch) | |
| tree | 4a4091c893432c0b4746253e7cc937703f0e5ba9 | |
| parent | ee65b3630b4e48948491a3584c2406ed224b1534 (diff) | |
fix review issue
| -rw-r--r-- | xmake/modules/private/service/remote_build/client.lua | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/xmake/modules/private/service/remote_build/client.lua b/xmake/modules/private/service/remote_build/client.lua index 93b3bf6c9..09ac126a6 100644 --- a/xmake/modules/private/service/remote_build/client.lua +++ b/xmake/modules/private/service/remote_build/client.lua @@ -469,20 +469,10 @@ function remote_build_client:_init_host() if host_name then -- find host by name or address for _, host in ipairs(remote_build_config.hosts) do - local host_ip, host_port = host.connect:split(":", {plain = true}) - - -- match by name - if host.name == host_name then - address = host.connect - token = host.token - break - -- match by full address - elseif host.connect == host_name then - address = host.connect - token = host.token - break - -- match by IP only (when user doesn't specify port) - elseif host_ip == host_name and not host_name:find(":", 1, true) then + local host_ip, _ = host.connect:split(":", {plain = true}) + if host.name == host_name or + host.connect == host_name or + (host_ip == host_name and not host_name:find(":", 1, true)) then address = host.connect token = host.token break |
