From 7c382c2d0803c5f0db9aa487f1caec185afc0e06 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 21 Sep 2023 10:04:59 +0200 Subject: [PATCH] refactoring --- tests-ng/actions-pre.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests-ng/actions-pre.sh b/tests-ng/actions-pre.sh index 8a859ac..506ae69 100755 --- a/tests-ng/actions-pre.sh +++ b/tests-ng/actions-pre.sh @@ -31,7 +31,10 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sg # $2 path grep_or_fail() { - grep "${1}" "${2}" >/dev/null 2>&1 || (echo "pattern not found in ${2}" && exit 1) + if ! grep "${1}" "${2}" >/dev/null 2>&1; then + echo "pattern not found in ${2}" + exit 1 + fi } # the action temp