Refine API response condition

This commit is contained in:
billz 2025-02-03 00:20:03 -08:00
parent a9804b2f9c
commit 6b7b8ef8d0

View File

@ -239,7 +239,7 @@ function _get_release() {
local host="api.github.com" local host="api.github.com"
response=$(curl -s "https://$host/repos/$repo/releases/latest") response=$(curl -s "https://$host/repos/$repo/releases/latest")
if echo "$response" | grep -q '"API rate limit exceeded"'; then if echo "$response" | grep -q 'API rate limit exceeded'; then
_install_status 1 "GitHub API rate limit exceeded. Try again later or use a GitHub token." _install_status 1 "GitHub API rate limit exceeded. Try again later or use a GitHub token."
return 1 return 1
fi fi