Skip to content

Commit

Permalink
curl add --connect-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
buxiaomo committed Dec 20, 2024
1 parent c05d5fe commit db3ebfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if ! command -v wget >/dev/null 2>&1; then
fi

if [ ! -f ./scripts/src/kubeasy-registry-v${KUBE_VERSION}.tar.gz ] || [ ! -f ./scripts/src/kubeasy-binary-v${KUBE_VERSION}.tar.gz ]; then
curl https://github.com >/dev/null 2>&1
curl --connect-timeout 3 https://github.com >/dev/null 2>&1
if [ $? != 0 ]; then
echo -e "\033[31mFailed to access github, please download manually.\033[0m"
exit 1
Expand All @@ -28,7 +28,7 @@ if [ ! -f ./scripts/src/kubeasy-registry-v${KUBE_VERSION}.tar.gz ] || [ ! -f ./s
fi
fi
else
curl https://github.com >/dev/null 2>&1
curl --connect-timeout 3 https://github.com >/dev/null 2>&1
if [ $? != 0 ]; then
echo -e "\033[31mFailed to access github, please manually check file integrity.\033[0m"
else
Expand Down

0 comments on commit db3ebfb

Please sign in to comment.