From 7cfb6ec1a39dcaaf07397cc8bf8802845cdebc4c Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Thu, 14 Nov 2019 18:38:41 +0800 Subject: [PATCH] fix the defect in the shell scripts when the binary is missing, it should prompt for downloading instead of sliently move on. --- cluster/common.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cluster/common.sh b/cluster/common.sh index d7b19b01cf6..72353568a3b 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -323,6 +323,9 @@ function find-tar() { # KUBE_MANIFESTS_TAR function find-release-tars() { SERVER_BINARY_TAR=$(find-tar kubernetes-server-linux-amd64.tar.gz) + if [[ -z "${SERVER_BINARY_TAR}" ]]; then + exit 1 + fi if [[ "${NUM_WINDOWS_NODES}" -gt "0" ]]; then NODE_BINARY_TAR=$(find-tar kubernetes-node-windows-amd64.tar.gz) fi