Suggest a way forward if the requested container is already present
This should smoothen the onboarding experience by making the commands self-documenting. https://github.com/debarshiray/toolbox/issues/59
This commit is contained in:
parent
6e9dc4ad89
commit
73980079ff
1 changed files with 3 additions and 2 deletions
5
toolbox
5
toolbox
|
@ -690,8 +690,11 @@ create()
|
|||
|
||||
echo "$base_toolbox_command: checking if container $toolbox_container already exists" >&3
|
||||
|
||||
enter_command=$(create_enter_command "$toolbox_container")
|
||||
if $prefix_sudo podman inspect --type container $toolbox_container >/dev/null 2>&3; then
|
||||
echo "$base_toolbox_command: container $toolbox_container already exists" >&2
|
||||
echo "Enter with: $enter_command" >&2
|
||||
echo "Try '$base_toolbox_command --help' for more information." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -753,8 +756,6 @@ create()
|
|||
fi
|
||||
|
||||
echo "Created container: $toolbox_container"
|
||||
|
||||
enter_command=$(create_enter_command "$toolbox_container")
|
||||
echo "Enter with: $enter_command"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue