fix too long long on non functionnal networt (and improve dwl)
This commit is contained in:
@@ -90,9 +90,14 @@ check_updates()
|
||||
return 4
|
||||
}
|
||||
|
||||
dwl "$UPDT_URL/version" "$vfile" >/dev/null 2>&1 || {
|
||||
# In quiet mode (startup), use a short timeout so a missing or slow network
|
||||
# never blocks the interactive prompt.
|
||||
local dwl_opts=()
|
||||
(( quiet == 1 )) && dwl_opts+=(-t 3)
|
||||
|
||||
dwl "${dwl_opts[@]}" "$UPDT_URL/version" "$vfile" >/dev/null 2>&1 || {
|
||||
rm -f "$vfile"
|
||||
disp E "Cannot download version file; unable to continue."
|
||||
(( quiet != 1 )) && disp E "Cannot download version file; unable to continue."
|
||||
return 5
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user