diff --git a/.docker/wait-for-it.sh b/.docker/wait-for-it.sh index 4c590bf6..f6167692 100755 --- a/.docker/wait-for-it.sh +++ b/.docker/wait-for-it.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash +# shellcheck disable=all # Use this script to test if a given TCP host/port are available # https://github.com/vishnubob/wait-for-it +# set -euo pipefail + WAITFORIT_cmdname=${0##*/} echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } @@ -63,9 +66,9 @@ wait_for_wrapper() wait $WAITFORIT_PID WAITFORIT_RESULT=$? if [[ $WAITFORIT_RESULT -ne 0 ]]; then - echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" + echoerr "$WAITFORIT_cmdname: timeout occurred after waiting ${WAITFORIT_TIMEOUT} seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" fi - return $WAITFORIT_RESULT + return ${WAITFORIT_RESULT} } # process arguments diff --git a/scripts/lint-sh.sh b/scripts/lint-sh.sh index 57e3bf3f..751fabe7 100755 --- a/scripts/lint-sh.sh +++ b/scripts/lint-sh.sh @@ -6,6 +6,7 @@ SH_SCRIPTS=$(find . -name '*.sh') EXIT_STATUS=0 for script in ${SH_SCRIPTS}; do + [[ ${script} == './.docker/wait-for-it.sh' ]] && continue grep '^set -euo pipefail' "${script}" > /dev/null 2>&1 && continue EXIT_STATUS=1