From 3b83b48fd27fc224c5fd534f88a2c0fb28ffdd06 Mon Sep 17 00:00:00 2001 From: Lewis Gaul Date: Tue, 4 Mar 2025 13:58:08 +0000 Subject: [PATCH] Fix error message suggesting `--user` instead of `--username` (#11947) ## Summary Fix error message suggesting `--user` instead of `--username`: ``` > uv publish --publish-url ... ... --password $(cat ~/.token) Publishing 1 file to ... error: 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. > uv publish --publish-url ... ... --user lewis --password $(cat ~/.token) error: unexpected argument '--user' found tip: a similar argument exists: '--username' Usage: uv publish |--username |--password |--token |--trusted-publishing |--keyring-provider |--publish-url |--check-url |--skip-existing> For more information, try '--help'. ``` ## Test Plan I have not tested manually, I'm hoping this isn't necessary and there will be sufficient CI coverage. --- crates/uv/src/commands/publish.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uv/src/commands/publish.rs b/crates/uv/src/commands/publish.rs index bcb1cf581..a5dc2c493 100644 --- a/crates/uv/src/commands/publish.rs +++ b/crates/uv/src/commands/publish.rs @@ -253,8 +253,8 @@ async fn gather_credentials( if password.is_some() && username.is_none() { 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." + with `--username` (`UV_PUBLISH_USERNAME`), or use `--token` (`UV_PUBLISH_TOKEN`) \ + instead of a password." ); }