File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use anyhow:: Result ;
2+ use std:: io:: { stdout, Write } ;
23use tracing:: { info, warn} ;
34
45use crate :: settings:: SettingsStore ;
@@ -16,13 +17,17 @@ pub trait CredentialsProvider {
1617pub struct StdinCredentialsProvider ;
1718impl CredentialsProvider for StdinCredentialsProvider {
1819 fn read_password ( & self ) -> Result < Password > {
19- print ! ( "Enter your password (hidden): " ) ;
20+ print ! ( "\n Enter your password (hidden): " ) ;
21+ let _ = stdout ( ) . flush ( ) ;
2022 let password = Password :: new ( & rpassword:: read_password ( ) ?) ?;
23+ println ! ( ) ;
2124 Ok ( password)
2225 }
2326 fn read_mfa_code ( & self ) -> Result < MfaCode > {
24- print ! ( "Enter your MFA code (hidden): " ) ;
27+ print ! ( "\n Enter your MFA code (hidden): " ) ;
28+ let _ = stdout ( ) . flush ( ) ;
2529 let mfa_code = MfaCode :: new ( & rpassword:: read_password ( ) ?) ?;
30+ println ! ( ) ;
2631 Ok ( mfa_code)
2732 }
2833}
You can’t perform that action at this time.
0 commit comments