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
a82c8cc5b8
commit
88b8ddd902
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)
|
ok := errors.As(err, &errECInfo)
|
||||||
|
|
||||||
if ok {
|
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())
|
printECInfo(cmd, errECInfo.ECInfo())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue