From ff298365626c4366eac930793918c6fbfb8c5d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 23 Feb 2022 18:44:31 +0100 Subject: [PATCH] fix(updater): timeout after 2s on available update check --- tools/check_for_upgrade.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index a36aecb84..2ad1fca92 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -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