Update to allow continue despite network issues (#855) (#856)

Change to allow install to continue like it does for Postgres

Co-authored-by: ThellraAK <github.com@absurdlybored.com>
This commit is contained in:
tteckster 2022-12-22 08:48:29 -05:00 committed by GitHub
parent 221176f20d
commit b0f5898f69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -62,8 +62,14 @@ set +e
alias die='' alias die=''
if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
msg_error "Internet NOT Connected" msg_error "Internet NOT Connected"
read -r -p "Would you like to continue anyway? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}"
else
echo -e " 🖧 Check Network Settings"
exit 1 exit 1
fi fi
fi
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
alias die='EXIT=$? LINE=$LINENO error_exit' alias die='EXIT=$? LINE=$LINENO error_exit'