mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-13 07:04:58 +00:00
ci: check curl before use it
install-yq.sh use curl but not check if curl is available or not. Add code to check curl before use it. Fixes: #1379 Signed-off-by: Hui Zhu <teawater@hyper.sh>
This commit is contained in:
parent
f1ef63e5c6
commit
aec0d263fa
@ -51,6 +51,11 @@ function install_yq() {
|
|||||||
|
|
||||||
mkdir -p "${GOPATH}/bin"
|
mkdir -p "${GOPATH}/bin"
|
||||||
|
|
||||||
|
# Check curl
|
||||||
|
if ! command -v "curl" >/dev/null; then
|
||||||
|
die "Please install curl"
|
||||||
|
fi
|
||||||
|
|
||||||
# Workaround to get latest release from github (to not use github token).
|
# Workaround to get latest release from github (to not use github token).
|
||||||
# Get the redirection to latest release on github.
|
# Get the redirection to latest release on github.
|
||||||
yq_latest_url=$(curl -Ls -o /dev/null -w %{url_effective} "https://${yq_pkg}/releases/latest")
|
yq_latest_url=$(curl -Ls -o /dev/null -w %{url_effective} "https://${yq_pkg}/releases/latest")
|
||||||
|
Loading…
Reference in New Issue
Block a user