From 89fc6f36fc524658ebc45791acad4ed9de46024d Mon Sep 17 00:00:00 2001 From: jiahui Date: Thu, 12 Oct 2023 16:31:14 +0800 Subject: [PATCH] optimize --- scripts/cloud/install.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/cloud/install.sh b/scripts/cloud/install.sh index 16b70b4be73..8c7bd969363 100644 --- a/scripts/cloud/install.sh +++ b/scripts/cloud/install.sh @@ -224,14 +224,13 @@ wait_cluster_ready() { local prompt_msg=$(get_prompt "wait_cluster_ready") while true; do if kubectl get nodes | grep "NotReady" &> /dev/null; then - loading_animation "$prompt_msg" + loading_animation "$prompt_msg" else - break + echo && break # new line fi - - read -t 1 -n 1 input + read -t 1 -n 1 -p "" input 2>/dev/null || true if [[ "$input" == "1" ]]; then - break + echo && break # new line fi done }