Override ARGS and fail correctly
See https://github.com/Coop-Cloud/peertube/issues/1.
This commit is contained in:
parent
ace854e1d7
commit
b2e0a95a11
13
abra
13
abra
|
@ -1841,10 +1841,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}}" \
|
||||
|
@ -1856,11 +1858,12 @@ sub_app_run(){
|
|||
fi
|
||||
|
||||
debug "Using container ID ${CONTAINER}"
|
||||
debug "Running command: docker exec $RUN_USER "$ARGS" "$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=SC2086
|
||||
docker exec $RUN_USER $ARGS "$CONTAINER" "$@"
|
||||
if ! docker exec $RUN_USER "$ARGS" "$CONTAINER" "$@"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue