Improve publish test error when no versions are found (#15594)

This commit is contained in:
Zanie Blue 2025-08-30 10:35:54 -05:00 committed by GitHub
parent d3c5b3fba7
commit a60312a9b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -194,6 +194,10 @@ def get_latest_version(target: str, client: httpx.Client) -> Version:
time.sleep(1) time.sleep(1)
else: else:
raise RuntimeError(f"Failed to fetch {url}") from error raise RuntimeError(f"Failed to fetch {url}") from error
if not versions:
raise ValueError(f"No versions found for {target_config.project_name}")
return max(versions) return max(versions)