From dda91d443c2d85ca6674dc01d11d514ba573d09a Mon Sep 17 00:00:00 2001 From: konsti Date: Tue, 15 Oct 2024 10:01:13 +0200 Subject: [PATCH] Publish: Password requires username (#8045) --- crates/uv/src/commands/publish.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/uv/src/commands/publish.rs b/crates/uv/src/commands/publish.rs index edd7e332f..a39f73768 100644 --- a/crates/uv/src/commands/publish.rs +++ b/crates/uv/src/commands/publish.rs @@ -81,6 +81,10 @@ 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"); + } + for (file, filename) in files { let size = fs_err::metadata(&file)?.len(); let (bytes, unit) = human_readable_bytes(size);