Publish: Better message for missing password (#8211)

This commit is contained in:
konsti
2024-10-15 14:25:23 +02:00
committed by GitHub
parent 494a1d782d
commit 738d2bec70
+5 -1
View File
@@ -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 {