forked from TrueCloudLab/frostfs-node
[#1147] cli: Fix output when print EC info with flags json
& proto
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
4c943eb00d
commit
8f9f20698b
1 changed files with 5 additions and 1 deletions
|
@ -152,7 +152,11 @@ func printECInfoErr(cmd *cobra.Command, err error) bool {
|
|||
ok := errors.As(err, &errECInfo)
|
||||
|
||||
if ok {
|
||||
cmd.PrintErrln("Object is erasure-encoded, ec information received.")
|
||||
toJSON, _ := cmd.Flags().GetBool(commonflags.JSON)
|
||||
toProto, _ := cmd.Flags().GetBool("proto")
|
||||
if !(toJSON || toProto) {
|
||||
cmd.PrintErrln("Object is erasure-encoded, ec information received.")
|
||||
}
|
||||
printECInfo(cmd, errECInfo.ECInfo())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue