-
Notifications
You must be signed in to change notification settings - Fork 937
Description
Describe the bug
When govc ls is run against a non-existent vSphere path like /testDC/host/dummyCluster, it yields an exit code of 0. This is incorrect; a non-zero exit code is expected for non-existent resources.
For example, when I use govc ls /testDC/host/dummyCluster , in any case the exit code is 0 even if the cluster doesn't exist. Considering cluster1 exists but any other name dummyCluster doesn't exist and we still get an exit code 0 which shouldn't be the case.
To Reproduce
Steps to reproduce the behavior:
- govc ls /testDC/host/cluster1
- echo $?
- govc ls /testDC/host/dummyCluster
- echo $?
Expected behavior
A clear and concise description of what you expected to happen.
govc ls /testDC/host/cluster1 should give proper exit code and non-zero if the cluster doesn't exist.
Affected version
Please provide details on the version used, e.g. release tag, commit, module version, etc.
Screenshots/Debug Output
If applicable, add screenshots or debug output to help explain your problem.
Additional context
Add any other context about the problem here.