forked from TrueCloudLab/frostfs-node
[#1424] neofs-cli: Fail immediately if a client can't be created
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
295ec3700a
commit
6cb9c13c5e
5 changed files with 18 additions and 11 deletions
|
@ -152,8 +152,7 @@ func prepareAPIClient(cmd *cobra.Command, dst ...clientWithKey) {
|
|||
|
||||
// creates NeoFS API client and writes it to target along with the private key.
|
||||
func prepareAPIClientWithKey(cmd *cobra.Command, key *ecdsa.PrivateKey, dst ...clientWithKey) {
|
||||
cli, err := internalclient.GetSDKClientByFlag(key, commonflags.RPC)
|
||||
common.ExitOnErr(cmd, "create API client: %w", err)
|
||||
cli := internalclient.GetSDKClientByFlag(cmd, key, commonflags.RPC)
|
||||
|
||||
for _, d := range dst {
|
||||
d.SetClient(cli)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue