forked from TrueCloudLab/frostfs-node
[#1484] neofs-cli: Print error on a separate line from a progress bar
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
e42b7f6a65
commit
24b4c1ecf4
2 changed files with 5 additions and 5 deletions
|
@ -89,6 +89,9 @@ func getObject(cmd *cobra.Command, _ []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err := internalclient.GetObject(prm)
|
res, err := internalclient.GetObject(prm)
|
||||||
|
if p != nil {
|
||||||
|
p.Finish()
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if ok := printSplitInfoErr(cmd, err); ok {
|
if ok := printSplitInfoErr(cmd, err); ok {
|
||||||
return
|
return
|
||||||
|
@ -99,9 +102,6 @@ func getObject(cmd *cobra.Command, _ []string) {
|
||||||
|
|
||||||
hdrFile := cmd.Flag("header").Value.String()
|
hdrFile := cmd.Flag("header").Value.String()
|
||||||
if filename != "" {
|
if filename != "" {
|
||||||
if p != nil {
|
|
||||||
p.Finish()
|
|
||||||
}
|
|
||||||
if hdrFile != "" || !strictOutput(cmd) {
|
if hdrFile != "" || !strictOutput(cmd) {
|
||||||
cmd.Printf("[%s] Object successfully saved\n", filename)
|
cmd.Printf("[%s] Object successfully saved\n", filename)
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,11 +135,11 @@ func putObject(cmd *cobra.Command, _ []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err := internalclient.PutObject(prm)
|
res, err := internalclient.PutObject(prm)
|
||||||
common.ExitOnErr(cmd, "rpc error: %w", err)
|
|
||||||
|
|
||||||
if p != nil {
|
if p != nil {
|
||||||
p.Finish()
|
p.Finish()
|
||||||
}
|
}
|
||||||
|
common.ExitOnErr(cmd, "rpc error: %w", err)
|
||||||
|
|
||||||
cmd.Printf("[%s] Object successfully stored\n", filename)
|
cmd.Printf("[%s] Object successfully stored\n", filename)
|
||||||
cmd.Printf(" ID: %s\n CID: %s\n", res.ID(), cnr)
|
cmd.Printf(" ID: %s\n CID: %s\n", res.ID(), cnr)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue