mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2025-01-13 02:11:29 +00:00
Handle rate limits in installer
This commit is contained in:
parent
b747a0cfc3
commit
2555870c31
@ -91,10 +91,12 @@ download_zoxide() {
|
|||||||
wget) _releases="$(wget -qO- "$_releases_url")" ||
|
wget) _releases="$(wget -qO- "$_releases_url")" ||
|
||||||
err "wget: failed to download $_releases_url" ;;
|
err "wget: failed to download $_releases_url" ;;
|
||||||
esac
|
esac
|
||||||
|
(echo "$_releases" | grep -q 'API rate limit exceeded') &&
|
||||||
|
err "you have exceeded GitHub's API rate limit. Please try again later, or use a different installation method: https://github.com/ajeetdsouza/zoxide/#installation"
|
||||||
|
|
||||||
local _package_url
|
local _package_url
|
||||||
_package_url="$(echo "$_releases" | grep "browser_download_url" | cut -d '"' -f 4 | grep "$_arch")" ||
|
_package_url="$(echo "$_releases" | grep "browser_download_url" | cut -d '"' -f 4 | grep "$_arch")" ||
|
||||||
err "zoxide has not yet been packaged for your architecture ($_arch), please file an issue at https://github.com/ajeetdsouza/zoxide/issues"
|
err "zoxide has not yet been packaged for your architecture ($_arch), please file an issue: https://github.com/ajeetdsouza/zoxide/issues"
|
||||||
|
|
||||||
local _ext
|
local _ext
|
||||||
case "$_package_url" in
|
case "$_package_url" in
|
||||||
|
Loading…
Reference in New Issue
Block a user