fix: update validation script for cloudflare tools check

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2024-04-14 14:50:32 -04:00
1 parent 22ad47418f
commit f37a8381ec
1 file changed
+1 -6
+1 -6
View File
@@ -87,12 +87,7 @@ def validate_cli_tools(distribution: str, cloudflare: dict, **_) -> None:
for tool in TALOS_CLI_TOOLS if distribution in ["talos"] else []: for tool in TALOS_CLI_TOOLS if distribution in ["talos"] else []:
if not which(tool): if not which(tool):
raise ValueError(f"Missing required CLI tool {tool}") raise ValueError(f"Missing required CLI tool {tool}")
for tool in ( for tool in CLOUDFLARE_TOOLS if cloudflare.get("enabled", False) else []:
CLOUDFLARE_TOOLS
if cloudflare.get("enabled", False)
and cast(dict, cloudflare.get("tunnel", {})).get("token", "") == ""
else []
):
if not which(tool): if not which(tool):
raise ValueError(f"Missing required CLI tool {tool}") raise ValueError(f"Missing required CLI tool {tool}")