bug: ionosctl
errors with exit code 1 if no images where found
#406
Labels
bug
Something isn't working
ionosctl
errors with exit code 1 if no images where found
#406
Description
If you search/filter for a name that does not exists - the tool errors:
This is and leads to unexpected behavior. A command should only error if there is anything wrong with the command/network/filesystem - not if the command return its expected outcome. For example in the CI. If there is no image the tool should output nothing and exit with 0. Or at leas there should be a flag for that.
Please apply to standard behavior
Expected behavior
Command returns nothing (or empty array if
json
output) and exits with code 0Environment
Go Version:
Ionosctl version:
OS:
Shell:
Configuration Files
None
How to Reproduce
If you search/filer for a name that does not exists - the tool errors:
This is and leads to unexpected behavior. A command should only error if there is anything wrong with the command/network/or - not if the command return its expected outcome. For example in the CI. If there is no image the tool should output nothing and exit with 0. Or at leas thee should be a flag for that.
Please apply to standard behavior
Error and Debug Output
Additional Notes
It is Industry standard to use non 0 exit codes if there is anything wrong - hears it behaves as expected. Most other tools also just exit with 0 when used with filter. See
docker ps --filter name=none-exist
orkubectl
Also if you specify
--output json
it should also output an empty array/object. In case of an actual error - the output should also bejson
not textReferences
The text was updated successfully, but these errors were encountered: