openSUSE / microos-toolbox

Script to run a toolbox container on openSUSE MicroOS
Apache License 2.0
54 stars 15 forks source link

Fix 'toolbox list' returning an error code even if working #28

Closed dfaggioli closed 3 years ago

dfaggioli commented 3 years ago

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

dfaggioli commented 3 years ago

Superseded by pull request #29