Skip to content

Commit

Permalink
Ignore lint for wait for it
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Dec 14, 2024
1 parent 9305f7c commit 0c3daa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .docker/wait-for-it.sh
Original file line number Diff line number Diff line change
@@ -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 }
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/lint-sh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c3daa2

Please sign in to comment.