-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.13
-
None
-
No
-
False
-
Description of problem:
when running the oc get pod command, and the request pod does not exist, the command will have a RC of 1 if specifying a name but a RC of 0 if specifying a label with the -l option
Version-Release number of selected component (if applicable):
[lgiorgi@fedora ~]$ oc version Client Version: 4.13.0 Kustomize Version: v4.5.7 Server Version: 4.12.7 Kubernetes Version: v1.25.4+18eadca
How reproducible:
Always
Steps to Reproduce:
1.Run `oc get pod -l <non-existing-selector>` 2.Run `echo $?` 3.See RC is 0 (incorrect) 4.Run `oc get pod <non-existing-pod>` 5.Run `echo $?` 6.See RC is 1 (correct)
Actual results:
oc get pod -l <selector> returns an RC of 0 when the pod does not exist
Expected results:
RC should be 1
Additional info: