diff --git a/cmdeploy/src/cmdeploy/remote/rdns.py b/cmdeploy/src/cmdeploy/remote/rdns.py index 78f66050..83853a98 100644 --- a/cmdeploy/src/cmdeploy/remote/rdns.py +++ b/cmdeploy/src/cmdeploy/remote/rdns.py @@ -81,7 +81,8 @@ def query_dns(typ, domain): ns = get_authoritative_ns(domain) # Query authoritative nameserver directly to bypass DNS cache. - res = shell(f"dig @{ns} -r -q {domain} -t {typ} +short", print=log_progress) + direct_ns = f"@{ns}" if ns else "" + res = shell(f"dig {direct_ns} -r -q {domain} -t {typ} +short", print=log_progress) return next((line for line in res.split("\n") if not line.startswith(";")), "")