From 8b8689221f9cfe6f7fcec61680fcad2eae25964b Mon Sep 17 00:00:00 2001 From: Wilson Silva Date: Wed, 7 Feb 2018 12:48:49 +0000 Subject: [PATCH] Fix the silent timeout error when netcat is not installed --- wait-for | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wait-for b/wait-for index ddfc39e..418de72 100755 --- a/wait-for +++ b/wait-for @@ -3,6 +3,11 @@ TIMEOUT=15 QUIET=0 +if ! which nc >/dev/null; then + echo "Netcat is not installed. This script requires netcat to work correctly." + exit 1 +fi + echoerr() { if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi }