mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 11:44:38 +00:00
utils: kata-manager: Ensure only one download URL
Add an extra sanity check to ensure that only a single download URL is found for the specified release version. Fixes: #8364. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
839f6c3d44
commit
c72a27e219
@ -196,6 +196,15 @@ github_get_release_file_url()
|
||||
|
||||
[ -z "$download_url" ] && die "Cannot determine download URL for version $version ($url)"
|
||||
|
||||
# Check to ensure there is only a single matching URL
|
||||
local expected_count=1
|
||||
|
||||
local count
|
||||
count=$(echo "$download_url" | wc -l)
|
||||
|
||||
[ "$count" -eq "$expected_count" ] || \
|
||||
die "expected $expected_count download URL but found $download_url"
|
||||
|
||||
echo "$download_url"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user