From 09a98e99a529c782c05318bb238534a12ddd81c1 Mon Sep 17 00:00:00 2001 From: Walter S <720628+WalterS@users.noreply.github.com> Date: Mon, 8 Jun 2020 18:05:51 +0200 Subject: [PATCH] Fix grep command Without "--", grep interprets search string "-t" as flag --- scripts/wait-for-it/wait-for-it.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wait-for-it/wait-for-it.sh b/scripts/wait-for-it/wait-for-it.sh index b931da1fb9..55bf38e16e 100755 --- a/scripts/wait-for-it/wait-for-it.sh +++ b/scripts/wait-for-it/wait-for-it.sh @@ -150,7 +150,7 @@ if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then WAITFORIT_ISBUSY=1 # Check if busybox timeout uses -t flag # (recent Alpine versions don't support -t anymore) - if timeout &>/dev/stdout | grep -q -e '-t '; then + if timeout &>/dev/stdout | grep -q -e -- '-t '; then WAITFORIT_BUSYTIMEFLAG="-t" fi else