forked from TrueCloudLab/frostfs-node
[#1136] cli: Allow usage of empty wallet passwords
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
b86b06c0ca
commit
c7a8c762e0
1 changed files with 4 additions and 2 deletions
|
@ -215,9 +215,11 @@ func getKeyNoGenerate() (*ecdsa.PrivateKey, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getPassword() (string, error) {
|
func getPassword() (string, error) {
|
||||||
if pass := viper.GetString(password); pass != "" {
|
// this check allows empty passwords
|
||||||
return pass, nil
|
if viper.IsSet(password) {
|
||||||
|
return viper.GetString(password), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return input.ReadPassword("Enter password > ")
|
return input.ReadPassword("Enter password > ")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue