mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 12:09:36 +08:00
fix(updater): use curl --connect-timeout
in new update check
This commit is contained in:
parent
e9e8c6b54d
commit
18e7e5d033
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user