浏览代码

fix(updater): use `curl --connect-timeout` in new update check

Marc Cornellà 1 年之前
父节点
当前提交
18e7e5d033
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/check_for_upgrade.sh

+ 1 - 1
tools/check_for_upgrade.sh

@@ -65,7 +65,7 @@ function is_update_available() {
   local remote_head
   local remote_head
   remote_head=$(
   remote_head=$(
     if (( ${+commands[curl]} )); then
     if (( ${+commands[curl]} )); then
-      curl -m 2 -fsSL -H 'Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
+      curl --conect-timeout 2 -fsSL -H 'Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
     elif (( ${+commands[wget]} )); then
     elif (( ${+commands[wget]} )); then
       wget -T 2 -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
     elif (( ${+commands[fetch]} )); then