We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3da388c commit 526b32dCopy full SHA for 526b32d
src/commands/registry.rs
@@ -143,6 +143,9 @@ impl Login {
143
let mut buf = String::new();
144
let mut stdin = std::io::stdin().lock();
145
stdin.read_to_string(&mut buf)?;
146
+ // trim trailing newlines and carriage returns (see https://blog.v-gar.de/2019/04/rust-remove-trailing-newline-after-input)
147
+ let len = buf.trim_end_matches(&['\r', '\n'][..]).len();
148
+ buf.truncate(len);
149
buf
150
} else {
151
match self.password {
0 commit comments