Skip to content

Commit

Permalink
chore: add bad-credentials exception for install script
Browse files Browse the repository at this point in the history
* fix typo at closing if statement
  • Loading branch information
viniciusdc committed Sep 9, 2024
1 parent 27d508f commit 3872752
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/install_kustomize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ else
releases=$(curl -s "$release_url" --header "Authorization: Bearer ${GITHUB_TOKEN}")
fi

if [[ $releases == *"Bad credentials"* ]]; then
echo "Authentication failed: Invalid GITHUB_TOKEN. Please check or remove your token."
exit 1
fi
if [[ $releases == *"API rate limit exceeded"* ]]; then
echo "Github rate-limiter failed the request. Either authenticate or wait a couple of minutes."
exit 1
Expand Down

0 comments on commit 3872752

Please sign in to comment.