From efa8e6547c9aa56150027f2b88b9fbd77a08b2b2 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Wed, 6 Dec 2023 15:32:37 +0000 Subject: [PATCH] CI: static-checks: Check params have a value Check that the `check_url()` parameters have a value. Signed-off-by: James O. D. Hunt --- tests/static-checks.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/static-checks.sh b/tests/static-checks.sh index 0635fc8c69..037b181043 100755 --- a/tests/static-checks.sh +++ b/tests/static-checks.sh @@ -494,8 +494,11 @@ EOF check_url() { - local url="$1" - local invalid_urls_dir="$2" + local url="${1:-}" + [ -n "$url" ] || die "need URL to check" + + local invalid_urls_dir="${2:-}" + [ -n "$invalid_urls_dir" ] || die "need invalid URLs directory" local curl_out=$(mktemp) files_to_remove+=("${curl_out}")