`kustomize version` command: invalid --output value fails silently
What happened?
While this is a very minor usability issue, it could help other users avoid the same confusion I experienced.
When using the kustomize version command with an invalid --output flag,
the command succeeds (exit code 0) but produces no output.
I'm used to using kubectl commands with --output=yaml, and occasionally I mistype it as --output=yml.
With kubectl, I get an immediate error, but kustomize silently failed without any feedback.
What did you expect to happen?
The command should return an error message indicating that the output format is invalid.
Expected error message:
# the same message as `kubectl version` with invalid `--output` flag
error: --output must be 'yaml' or 'json'
How can we reproduce it (as minimally and precisely as possible)?
Run the following command with an invalid output format:
$ kustomize version --output=yml
# silently fails
Expected output
Actual output
Kustomize version
v5.8.0
Operating system
Linux
I agree with the opinion that it would be better to standardize the behavior.
/triage accepted /priority important-longterm