Properly format test publish error (#11001)

This commit is contained in:
konsti 2025-01-27 21:03:21 +01:00 committed by GitHub
parent a00f6f5d3d
commit bd9607bbf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -380,7 +380,7 @@ def publish_project(target: str, uv: Path, client: httpx.Client):
) )
args = [uv, "publish", "--publish-url", publish_url, *extra_args] args = [uv, "publish", "--publish-url", publish_url, *extra_args]
result = run(args, cwd=project_dir, env=env, stderr=PIPE) result = run(args, cwd=project_dir, env=env, text=True, stderr=PIPE)
if result.returncode == 0: if result.returncode == 0:
# Successful upload # Successful upload
break break
@ -388,7 +388,8 @@ def publish_project(target: str, uv: Path, client: httpx.Client):
retries -= 1 retries -= 1
if retries > 0: if retries > 0:
print( print(
f"Publish failed, retrying after 10s: {result.stderr}", file=sys.stderr f"Publish failed, retrying after 10s:\n---\n{result.stderr}\n---",
file=sys.stderr,
) )
sleep(10) sleep(10)
else: else: