From cc69e1cee2575b9bbce140f648e4d769c76ed411 Mon Sep 17 00:00:00 2001 From: Eric Keller Date: Sat, 2 Sep 2017 19:38:45 +0200 Subject: [PATCH] Comment about more basic way to check connectivity --- tools/check_for_upgrade.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 965613592..e1e713b32 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -23,6 +23,9 @@ function _upgrade_zsh() { # -L follow redirect, -s silent, # --max-time overall operation timeout, -I only download headers whence curl > /dev/null && curl -L -s --max-time 3 -I ${REMOTE} > /dev/null || return 0 + # the curl call could be replaced by: + # `ping -q -c 1 -W 1 8.8.8.8 >/dev/null` without DNS resolution + # or `ping -q -c 1 -W 1 github.com >/dev/null` env ZSH=$ZSH sh $ZSH/tools/upgrade.sh # update the zsh file _update_zsh_update