mirror of
https://github.com/astral-sh/uv
synced 2026-06-21 13:47:25 +00:00
Improve crates.io new crate error message (#19523)
This commit is contained in:
@@ -309,11 +309,20 @@ def main() -> None:
|
||||
|
||||
token = os.environ.get("CARGO_REGISTRY_TOKEN", "")
|
||||
if not token:
|
||||
crate_names = ", ".join(crate["name"] for crate in candidates)
|
||||
print(
|
||||
f"Crates requiring crates.io publish setup: {crate_names}",
|
||||
file=sys.stderr,
|
||||
)
|
||||
print(
|
||||
"error: CARGO_REGISTRY_TOKEN is required (with `publish-new`"
|
||||
" and `trusted-publishing` scopes)",
|
||||
file=sys.stderr,
|
||||
)
|
||||
print(
|
||||
"\nPlease reach out to Zanie about releases which add a new crate.",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
client = httpx.Client(headers={"User-Agent": USER_AGENT}, timeout=30)
|
||||
|
||||
Reference in New Issue
Block a user