Skip to content

Commit

Permalink
fix(updater): timeout after 2s on available update check
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Feb 24, 2022
1 parent 914b639 commit ff29836
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/check_for_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ function is_update_available() {
local remote_head
remote_head=$(
if (( ${+commands[curl]} )); then
curl -fsSL -H 'Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
curl -m 2 -fsSL -H 'Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
elif (( ${+commands[wget]} )); then
wget -O- --header='Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
wget -T 2 -O- --header='Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
elif (( ${+commands[fetch]} )); then
HTTP_ACCEPT='Accept: application/vnd.github.v3.sha' fetch -o - $api_url 2>/dev/null
HTTP_ACCEPT='Accept: application/vnd.github.v3.sha' fetch -T 2 -o - $api_url 2>/dev/null
else
exit 0
fi
Expand Down

0 comments on commit ff29836

Please sign in to comment.