CI: static-checks: Check params have a value

Check that the `check_url()` parameters have a value.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2023-12-06 15:32:37 +00:00
parent 563ea020b0
commit efa8e6547c

View File

@ -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}")