mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Print password prompt on stderr.
This commit is contained in:
parent
9a8957169f
commit
d0a84d7915
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
use getopts;
|
||||
use rpassword;
|
||||
use std::io::{stdout, Write};
|
||||
use std::io::{stderr, Write};
|
||||
use std::path::PathBuf;
|
||||
use std::process::exit;
|
||||
|
||||
|
@ -107,8 +107,8 @@ pub fn get_credentials(session: &Session, matches: &getopts::Matches) -> Credent
|
|||
=> credentials.clone(),
|
||||
|
||||
(Some(username), None, _) => {
|
||||
print!("Password for {}: ", username);
|
||||
stdout().flush().unwrap();
|
||||
write!(stderr(), "Password for {}: ", username).unwrap();
|
||||
stderr().flush().unwrap();
|
||||
let password = rpassword::read_password().unwrap();
|
||||
Credentials::with_password(username.clone(), password)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue