diff --git a/cmd/neofs-cli/modules/root.go b/cmd/neofs-cli/modules/root.go index b260684a1..801513815 100644 --- a/cmd/neofs-cli/modules/root.go +++ b/cmd/neofs-cli/modules/root.go @@ -215,9 +215,11 @@ func getKeyNoGenerate() (*ecdsa.PrivateKey, error) { } func getPassword() (string, error) { - if pass := viper.GetString(password); pass != "" { - return pass, nil + // this check allows empty passwords + if viper.IsSet(password) { + return viper.GetString(password), nil } + return input.ReadPassword("Enter password > ") }