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

See https://git.autonomic.zone/coop-cloud/abra/issues/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

20
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
}
@ -2153,14 +2159,14 @@ sub_recipe_lint() {
fi
# Check that at least one service has Traefik enabled
if $YQ e '.services.*.deploy.labels.[] == "traefik.enable=true"' "$compose_file" | grep -q true; then
if $YQ e '.services.*.deploy.labels.[] == "traefik.enable=true"' "$compose_file" | grep -q true; then
info "Found at least one Traefik-enabled service"
else
warning "Can't find any Traefik-enabled service"
fi
# Healthcheck check (check)
if $YQ e -e '.services.*.healthcheck' "$compose_file" > /dev/null 2>&1; then
if $YQ e -e '.services.*.healthcheck' "$compose_file" > /dev/null 2>&1; then
info "Found a healthcheck for at least one service."
else
warning "Can't find any healthchecks."