Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28294 from ncdc/return-error-for-kubectl-get-sing…
…luar Automatic merge from submit-queue kubectl: don't display an empty list when trying to get a single resource that isn't found Return immediately when attempting to get a singular resource that isn't found, so that we avoid printing out a List if the output format is something like json or yaml. Before: ``` $ kubectl get pod/foo -o yaml apiVersion: v1 items: [] kind: List metadata: {} pods "foo" not found ``` After: ``` $ kubectl get pod/foo -o yaml pods "foo" not found ``` Fixes #28243 @kubernetes/kubectl @kubernetes/rh-ux @smarterclayton @liggitt @deads2k @metral
- Loading branch information