[#1424] neofs-cli: Fail immediately if a key can't be fetched
If the key can't be fetched, an error is always returned, so it makes sense to fail the whole command inside of a `key.Get*()`. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
d9c5ca5e77
commit
295ec3700a
19 changed files with 70 additions and 69 deletions
|
@ -48,10 +48,7 @@ func init() {
|
|||
}
|
||||
|
||||
func createSession(cmd *cobra.Command, _ []string) error {
|
||||
privKey, err := key.Get()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
privKey := key.Get(cmd)
|
||||
|
||||
var netAddr network.Address
|
||||
addrStr, _ := cmd.Flags().GetString(commonflags.RPC)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue