fix: automatically select a container type if none is specified

Closes #6893
This commit is contained in:
Jose Diaz-Gonzalez committed 2024-09-23 21:41:02 -04:00
1 parent 0f8395365e
commit caa7b10091
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -12,6 +12,9 @@ enter <app> [<container-type> || --container-id <container-id>] # Connect to a
The `enter` command can be used to enter a running container. The following variations of the command exist:
```shell
# enter the first container
dokku enter node-js-app
# enter the web process
dokku enter node-js-app web
@@ -39,7 +39,7 @@ trigger-scheduler-docker-local-scheduler-enter() {
esac
done
if [[ -z "$CONTAINER_ID" ]] && [[ -z "$CONTAINER_TYPE" ]]; then
if [[ -z "$CONTAINER_ID" ]] && [[ -z "$CONTAINER_TYPE" || "$CONTAINER_TYPE" == "--" ]]; then
AVAILABLE_CONTAINER_TYPES=($(get_app_running_container_types "$APP"))
if [[ ${#AVAILABLE_CONTAINER_TYPES[@]} -gt 1 ]]; then
dokku_log_warn "No container type specified."