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