From 8a1102fd08f3afff394512b453566cb971319917 Mon Sep 17 00:00:00 2001 From: fkobi Date: Thu, 9 Jan 2025 10:18:24 +0000 Subject: [PATCH] simplify test_fail.sh the default `exit` value is 0 so we do not need to explicitly call it --- test_fail.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test_fail.sh b/test_fail.sh index 754f3c7..512d69f 100755 --- a/test_fail.sh +++ b/test_fail.sh @@ -1,9 +1,6 @@ #!/bin/sh +# show what is to be run echo $1 -eval $1 - -if [ $? -eq 0 ]; then - exit 0; -fi -exit 1; +# run the command +eval $1 || exit 1 # if fails, return 1