We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3e352e commit 06bd857Copy full SHA for 06bd857
src/cargo/ops/registry.rs
@@ -764,7 +764,11 @@ pub fn registry_login(
764
.with_context(|| "failed to read stdin")?;
765
// Automatically remove `cargo login` from an inputted token to
766
// allow direct pastes from `registry.host()`/me.
767
- line.replace("cargo login", "").trim().to_string()
+ line.replace("cargo login", "").trim().to_string();
768
+ if line.is_empty() {
769
+ bail!("please provide a non-empty token");
770
+ }
771
+ line
772
}
773
};
774
0 commit comments