From 738d2bec70c1f263f9efbdd142b8a2523ff829b7 Mon Sep 17 00:00:00 2001 From: konsti Date: Tue, 15 Oct 2024 14:25:23 +0200 Subject: [PATCH] Publish: Better message for missing password (#8211) --- crates/uv/src/commands/publish.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/uv/src/commands/publish.rs b/crates/uv/src/commands/publish.rs index 411b97c7d..b850e7b0d 100644 --- a/crates/uv/src/commands/publish.rs +++ b/crates/uv/src/commands/publish.rs @@ -82,7 +82,11 @@ pub(crate) async fn publish( }; if password.is_some() && username.is_none() { - bail!("You need to provide a username with a password, use `--token` for tokens"); + bail!( + "Attempted to publish with a password, but no username. Either provide a username \ + with `--user` (`UV_PUBLISH_USERNAME`), or use `--token` (`UV_PUBLISH_TOKEN`) instead \ + of a password." + ); } for (file, raw_filename, filename) in files {