The cleanup handler always tries to stop the container. If we're only
listing existing containers, there's nothing to stop and the 'podman
stop' command gives an error, which is then used as the exit status.
This means that when doing 'toolbox list', it always looks like it's
failing even when it actually worked.
Fix that by handling the case of only listing the containers (i.e.,
the list command) before installing the cleanup handler. This should
fix issue #23.
The cleanup handler always tries to stop the container. If we're only listing existing containers, there's nothing to stop and the 'podman stop' command gives an error, which is then used as the exit status.
This means that when doing 'toolbox list', it always looks like it's failing even when it actually worked.
Fix that by handling the case of only listing the containers (i.e., the list command) before installing the cleanup handler. This should fix issue #23.
Signed-off-by: Dario Faggioli dfaggioli@suse.com