From e010aa75b228abcbb4cde6591c64b88ee72bf135 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Fri, 15 Sep 2023 07:21:28 +0000 Subject: [PATCH] Fix syntax errors in Kissat checking script In bash, `return` can only be used within a function. Use `exit` instead. --- scripts/check_kissat_version.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check_kissat_version.sh b/scripts/check_kissat_version.sh index 6cd07b940660..3bcd78ba872e 100755 --- a/scripts/check_kissat_version.sh +++ b/scripts/check_kissat_version.sh @@ -11,16 +11,16 @@ source "${KANI_DIR}/kani-dependencies" if [ -z "${KISSAT_VERSION:-}" ]; then echo "$0: ERROR: KISSAT_VERSION is not set" - return 1 + exit 1 fi cmd="kissat --version" if kissat_version=$($cmd); then # Perform a lexicographic comparison of the version if [[ $kissat_version < $KISSAT_VERSION ]]; then echo "ERROR: Kissat version is $kissat_version. Expected at least $KISSAT_VERSION." - return 1 + exit 1 fi else echo "ERROR: Couldn't run command '$cmd'" - return 1 + exit 1 fi