diff --git a/cmd/neofs-cli/modules/object/get.go b/cmd/neofs-cli/modules/object/get.go index bc8a6b3f9..0409ac104 100644 --- a/cmd/neofs-cli/modules/object/get.go +++ b/cmd/neofs-cli/modules/object/get.go @@ -89,6 +89,9 @@ func getObject(cmd *cobra.Command, _ []string) { } res, err := internalclient.GetObject(prm) + if p != nil { + p.Finish() + } if err != nil { if ok := printSplitInfoErr(cmd, err); ok { return @@ -99,9 +102,6 @@ func getObject(cmd *cobra.Command, _ []string) { hdrFile := cmd.Flag("header").Value.String() if filename != "" { - if p != nil { - p.Finish() - } if hdrFile != "" || !strictOutput(cmd) { cmd.Printf("[%s] Object successfully saved\n", filename) } diff --git a/cmd/neofs-cli/modules/object/put.go b/cmd/neofs-cli/modules/object/put.go index 1c4a7fbe1..3fad9bbe9 100644 --- a/cmd/neofs-cli/modules/object/put.go +++ b/cmd/neofs-cli/modules/object/put.go @@ -135,11 +135,11 @@ func putObject(cmd *cobra.Command, _ []string) { } res, err := internalclient.PutObject(prm) - common.ExitOnErr(cmd, "rpc error: %w", err) - if p != nil { p.Finish() } + common.ExitOnErr(cmd, "rpc error: %w", err) + cmd.Printf("[%s] Object successfully stored\n", filename) cmd.Printf(" ID: %s\n CID: %s\n", res.ID(), cnr) }