Closed
Description
Problem
Specifying the logon token via the command-line will cause a hang if stdin
is not attached to a terminal (such as when running in automation).
Steps
cargo login --registry xxxxxxxx "Bearer XXXXXXXXXXXXXXXXXXXXXXXXX"
Possible Solution(s)
Workaround:
"Bearer XXXXXXXXXXXXXXXXXXXXXXXXX" | cargo login --registry xxxxxxxx
Notes
Likely introduced by #12334:
cargo/src/cargo/ops/registry/login.rs
Lines 38 to 44 in 263d24b
Version
cargo 1.73.0-nightly (c91a693e7 2023-07-31)
release: 1.73.0-nightly
commit-hash: c91a693e7977e33a1064b63a5daf5fb689f01651
commit-date: 2023-07-31
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.2.1-DEV (sys:0.4.65+curl-8.2.1 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u 30 May 2023
os: Ubuntu 20.04 (focal) [64-bit]