Attempt to unbork interactive breakage
continuous-integration/drone/push Build is passing Details

See #204.
This commit is contained in:
decentral1se 2021-07-10 16:00:00 +02:00
parent 349b468140
commit 3d5d3ff3ac
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 13 additions and 7 deletions

14
abra
View File

@ -1846,10 +1846,12 @@ sub_app_run(){
RUN_USER="-u $abra___user"
fi
local -a ARGS="${ARGS:-""}"
if [ "$abra___no_tty" = "true" ]; then
ARGS="-i"
ARGS+=" -i"
else
ARGS="-it"
ARGS+=" -it"
fi
CONTAINER=$(docker container ls --format "table {{.ID}},{{.Names}}" \
@ -1862,11 +1864,15 @@ sub_app_run(){
debug "Using container ID ${CONTAINER}"
# 3wc: we want the "splitting" that shellcheck warns us about, so that -u and
# $RUN_USER aren't treated as a single argument:
# shellcheck disable=SC2145
debug "Running command: docker exec $RUN_USER $ARGS $CONTAINER $@"
# shellcheck disable=SC2086
docker exec $RUN_USER $ARGS "$CONTAINER" "$@"
# shellcheck disable=SC2181
if [[ $? != 0 ]]; then exit 1; fi
return
}