forked from TrueCloudLab/frostfs-node
[#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
|
@ -6,6 +6,7 @@ import (
|
|||
rawclient "github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
|
||||
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/common"
|
||||
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/commonflags"
|
||||
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/key"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -18,7 +19,7 @@ var dropObjectsCmd = &cobra.Command{
|
|||
Short: "Drop objects from the node's local storage",
|
||||
Long: "Drop objects from the node's local storage",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
pk := getKey(cmd)
|
||||
pk := key.Get(cmd)
|
||||
|
||||
dropObjectsList, _ := cmd.Flags().GetStringSlice(dropObjectsFlag)
|
||||
binAddrList := make([][]byte, 0, len(dropObjectsList))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue