diff --git a/config/rootfs/debos/scripts/bookworm-gst-fluster.sh b/config/rootfs/debos/scripts/bookworm-gst-fluster.sh index 22d170575e..5229cd6aa0 100755 --- a/config/rootfs/debos/scripts/bookworm-gst-fluster.sh +++ b/config/rootfs/debos/scripts/bookworm-gst-fluster.sh @@ -129,15 +129,20 @@ extract_vector_from_archive() { } download_fluster_testsuite() { - json_file=$(readlink -e "${1}") + local fluster_testsuite="${1}" - [ -z "${json_file}" ] && { + [ -z "${fluster_testsuite}" ] && { echo "No JSON test suite file provided" exit 1 } + # disable set -e (immediate exit) to allow error handling after readlink failure + set +e + json_file=$(readlink -e "${fluster_testsuite}") + set -e + if [ ! -f "${json_file}" ]; then - echo "${json_file} file not found!" + echo "${fluster_testsuite} file not found!" exit 1 fi