diff --git a/hack/install_kustomize.sh b/hack/install_kustomize.sh index 0b549ffb6..49e9a9d62 100755 --- a/hack/install_kustomize.sh +++ b/hack/install_kustomize.sh @@ -102,7 +102,14 @@ elif [[ "$OSTYPE" == darwin* ]]; then opsys=darwin fi -RELEASE_URL=$(curl -s $release_url |\ +releases=$(curl -s $release_url) + +if [[ $releases == *"API rate limit exceeded"* ]]; then + echo "Github rate-limiter failed the request. Either authenticate or wait a couple of minutes." + exit 1 +fi + +RELEASE_URL=$(echo $releases |\ grep browser_download.*${opsys}_${arch} |\ cut -d '"' -f 4 |\ sort -V | tail -n 1)