Skip to content

toolbox create command (ran from within toolbx) is not failing when container already exists. #957

@JayDoubleu

Description

@JayDoubleu

Describe the bug
toolbox create command is not failing when container already exists while running from within toolbox

Steps how to reproduce the behaviour

[user@hostname ~]$ toolbox create --distro fedora --release f35
Error: container fedora-toolbox-35 already exists
Enter with: toolbox enter
Run 'toolbox --help' for usage.
[user@hostname ~]$ echo $?
1

[user@hostname ~]$ toolbox run toolbox create --distro fedora --release f35
[user@hostname ~]$ echo $?
0
[user@hostname ~]$ 

Expected behaviour
Should return Error: container fedora-toolbox-35 already exists and return code 1

Actual behaviour
No output and return code 0

Output of toolbox --version (v0.0.90+)
toolbox version 0.0.99.2

Toolbox package info (rpm -q toolbox)
e.g., toolbox-0.0.18-2.fc32.noarch

Output of podman version

Version:      3.4.2
API Version:  3.4.2
Go Version:   go1.16.8
Built:        Fri Nov 12 20:25:37 2021
OS/Arch:      linux/amd64

Podman package info (rpm -q podman)
podman-3.4.2-1.fc35.x86_64

Info about your OS
e.g., Fedora Silverblue 35

Other information

Same result when running from interactive shell inside toolbox as well as with toolbox run

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions