From bb150cdd4fc09eec68e72ff113ce42003b303306 Mon Sep 17 00:00:00 2001 From: Li Bo Date: Tue, 26 Jan 2021 20:12:58 +0800 Subject: [PATCH] change minimum bash version to 4.2 --- hack/lib/util.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 8ed0a597cef..401ea1a726a 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -734,8 +734,8 @@ function kube::util::ensure_dockerized { # function kube::util::ensure-bash-version { # shellcheck disable=SC2004 - if ((${BASH_VERSINFO[0]}<5)); then - echo "ERROR: This script requires a minimum bash version of 5.0" + if ((${BASH_VERSINFO[0]}<4)) || ( ((${BASH_VERSINFO[0]}==4)) && ((${BASH_VERSINFO[1]}<2)) ); then + echo "ERROR: This script requires a minimum bash version of 4.2, but got version of ${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" exit 1 fi }