[#2090] neofs-cli: Remove `--header` from `object get`

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
remotes/carpawell/feat/parallel-meta-get-bench
Anton Nikiforov 2022-11-25 14:12:11 +03:00 committed by fyrchik
parent 79130f781e
commit 51e886dd67
2 changed files with 6 additions and 9 deletions

View File

@ -41,7 +41,8 @@ Changelog for NeoFS Node
- ObjectID signature output in the CLI (#2104)
### Removed
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089)
- `--header` from `neofs-cli object get` (#2090)
### Updated
### Updating from v0.34.0

View File

@ -37,7 +37,6 @@ func initObjectGetCmd() {
_ = objectGetCmd.MarkFlagRequired(commonflags.OIDFlag)
flags.String(fileFlag, "", "File to write object payload to(with -b together with signature and header). Default: stdout.")
flags.String("header", "", "File to write header to. Default: stdout.")
flags.Bool(rawFlag, false, rawFlagDesc)
flags.Bool(noProgressFlag, false, "Do not show progress bar")
flags.Bool(binaryFlag, false, "Serialize whole object structure into given file(id + signature + header + payload).")
@ -124,16 +123,13 @@ func getObject(cmd *cobra.Command, _ []string) {
common.ExitOnErr(cmd, "unable to write binary object in out: %w ", err)
}
hdrFile := cmd.Flag("header").Value.String()
if filename != "" {
if hdrFile != "" || !strictOutput(cmd) {
cmd.Printf("[%s] Object successfully saved\n", filename)
}
if filename != "" && !strictOutput(cmd) {
cmd.Printf("[%s] Object successfully saved\n", filename)
}
// Print header only if file is not streamed to stdout.
if filename != "" || hdrFile != "" {
err = saveAndPrintHeader(cmd, res.Header(), hdrFile)
if filename != "" {
err = printHeader(cmd, res.Header())
common.ExitOnErr(cmd, "", err)
}
}