File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ function get_compose_executable() {
120120function compose_run() {
121121 local COMPOSE=$1
122122 local ENV_FILE=$2
123+ local INTERRUPT_START_CONTAINER=${INTERRUPT_START_CONTAINER:- no}
123124
124125 COMPOSE_EXEC=$( get_compose_executable)
125126
@@ -131,7 +132,9 @@ function compose_run() {
131132 local START_CONTAINER
132133 START_CONTAINER=$( grep " ^START_CONTAINER=" " $ENV_FILE " | sed -e ' s/^START_CONTAINER=//' | sed -e ' s/[[:space:]]*$//' )
133134
134- if [[ -n " $START_CONTAINER " ]]; then
135+ if [[ " no" != " $INTERRUPT_START_CONTAINER " ]]; then
136+ echo " Interrupting to start a shell into container."
137+ elif [[ -n " $START_CONTAINER " ]]; then
135138 if [[ " none" != " $START_CONTAINER " ]]; then
136139 # retry sh, if bash is not found
137140 docker exec -it " ${START_CONTAINER} " bash || \
You can’t perform that action at this time.
0 commit comments