Skip to content

Commit 290db51

Browse files
author
t11s
authored
Update registry.rs
1 parent 4ec6aac commit 290db51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cargo/ops/registry.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ pub fn configure_http_handle(config: &Config, handle: &mut Easy) -> CargoResult<
434434
if let Some(check) = http.check_revoke {
435435
handle.ssl_options(SslOpt::new().no_revoke(!check))?;
436436
}
437+
437438
if let Some(user_agent) = &http.user_agent {
438439
handle.useragent(user_agent)?;
439440
} else {
@@ -598,6 +599,7 @@ pub fn registry_login(
598599
.read_line(&mut line)
599600
.chain_err(|| "failed to read stdin")
600601
.map_err(failure::Error::from)?;
602+
// Automatically remove `cargo login` from an inputted token to allow direct pastes from `registry.host()`/me.
601603
line.replace("cargo login", "").trim().to_string()
602604
}
603605
};

0 commit comments

Comments
 (0)