mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
return a meaningful message if we hit the rate-limiter of GitHub
This commit is contained in:
@@ -102,7 +102,14 @@ elif [[ "$OSTYPE" == darwin* ]]; then
|
|||||||
opsys=darwin
|
opsys=darwin
|
||||||
fi
|
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} |\
|
grep browser_download.*${opsys}_${arch} |\
|
||||||
cut -d '"' -f 4 |\
|
cut -d '"' -f 4 |\
|
||||||
sort -V | tail -n 1)
|
sort -V | tail -n 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user