neofs-node icon indicating copy to clipboard operation
neofs-node copied to clipboard

cli: Do not print help on any failure

Open cthulhu-rider opened this issue 3 years ago • 1 comments

Any error returned by implemented command executor leads to additional help output. It is useful when the user incorrectly formed a command, but not more.

Solution

Replace providing the RunE calls of to cobra.Command (errors of which are actually lead to help) with Run. With this approach command misprints are still handled, but other errors are written user friendly. For errors cmd.PrintErr function group, for logs - cmd.Print* w/o Err.

cthulhu-rider avatar Jun 17 '21 16:06 cthulhu-rider