diff --git a/cmd/neofs-cli/modules/root.go b/cmd/neofs-cli/modules/root.go index 3b7b81299a..0c5d16b6e1 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 > ") }