Skip to content

Commit

Permalink
Publish: Password requires username (#8045)
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin authored Oct 15, 2024
1 parent 88cbc98 commit dda91d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/uv/src/commands/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dda91d4

Please sign in to comment.