[go: nahoru, domu]

Skip to content

Commit

Permalink
utils: kata-manager: Ensure only one download URL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jodh-intel committed Nov 7, 2023
1 parent e1f90db commit 8705467
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utils/kata-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,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"
}

Expand Down

0 comments on commit 8705467

Please sign in to comment.