Just warn instead of failing when tags cannot be fetched.

This commit is contained in:
Patrick 2025-07-07 00:13:07 +02:00
parent 0ac1621494
commit 4bae8d67a0

View File

@ -50,7 +50,10 @@ def _git_branch(env: Environment, repo_name: str, remote_url: str, git_ref: str
def _git_tags(env: Environment, repo_name: str, remote_url: str, force_fetch: bool = False) -> 'list[str]': def _git_tags(env: Environment, repo_name: str, remote_url: str, force_fetch: bool = False) -> 'list[str]':
repo, origin = _clone(env, repo_name, remote_url) repo, origin = _clone(env, repo_name, remote_url)
if force_fetch or env['UPDATE_REPOSITORIES']: if force_fetch or env['UPDATE_REPOSITORIES']:
try:
origin.fetch(tags=True) origin.fetch(tags=True)
except GitError:
env.Warn(f'Error fetching tags from {repo_name} ({remote_url})')
return [t.name for t in repo.tags] return [t.name for t in repo.tags]
def _make_callable(val): def _make_callable(val):