If the CLI shows help because of a malformed command, but --help
was not passed, return nonzeroΒ #3466
Closed
Description
Thanks for your work on kind, it's very helpful.
I mistyped a command: kind clusters get
. That's not how the CLI works. It should have been kind get clusters
.
Helpfully, kind showed me the help. Unhelpfully, kind returned 0, as if everything had gone according to plan. Later, I tried to recall this command via fzf, expecting to chose from a list of past successes.
Instead I was shown both failures and successes:
kind get clusters
kind clusters get
This happened because kind returned 0 for both, so my history search couldn't tell the successes from the failures.
Git behaves appropriately:
$ git status > /dev/null && echo good || echo bad
good
$ git schmatus 2> /dev/null && echo good || echo bad
bad
Kind does not:
$ kind get clusters > /dev/null && echo good || echo bad
good
$ kind clusters get > /dev/null && echo good || echo bad
good
Environment:
- kind version: (use
kind version
):
kind v0.20.0 go1.21.3 darwin/amd64