fix: check whether to use go proxy in build (#1149)

This commit is contained in:
Taoning Ge
2022-09-22 22:14:25 +08:00
committed by GitHub
parent 575a248c41
commit 79f2af405a

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
#try to connect to google to determine whether user need to use proxy #try to connect to google to determine whether user need to use proxy
curl www.google.com -o /dev/null --connect-timeout 5 2 > /dev/null curl www.google.com -o /dev/null --connect-timeout 5 2> /dev/null
if [ $? == 0 ] if [ $? == 0 ]
then then
echo "Successfully connected to Google, no need to use Go proxy" echo "Successfully connected to Google, no need to use Go proxy"