mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Fix test again
This commit is contained in:
parent
6ff9b7ddce
commit
0b2bc83d82
|
|
@ -157,6 +157,7 @@ func getPassword(password, pwdFile string, pwdStdin bool, r io.Reader) (string,
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no parameter was set, ask the user to provide the password
|
// If no parameter was set, ask the user to provide the password
|
||||||
|
if password == "" {
|
||||||
fmt.Print("Enter Password: ")
|
fmt.Print("Enter Password: ")
|
||||||
bytePassword, err := term.ReadPassword(int(os.Stdin.Fd()))
|
bytePassword, err := term.ReadPassword(int(os.Stdin.Fd()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -173,5 +174,7 @@ func getPassword(password, pwdFile string, pwdStdin bool, r io.Reader) (string,
|
||||||
return "", fmt.Errorf("Entered passwords don't match")
|
return "", fmt.Errorf("Entered passwords don't match")
|
||||||
}
|
}
|
||||||
return strings.TrimSpace(string(bytePassword)), nil
|
return strings.TrimSpace(string(bytePassword)), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return password, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue