From 7f1c6740f7c82f1ee950990edbad3993dfd26c97 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Tue, 9 Feb 2021 22:40:01 -0800 Subject: [PATCH] suggest homebrew when bash is too old on macOS --- hack/lib/util.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 401ea1a726a..2f35f3cf0cb 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -736,6 +736,9 @@ function kube::util::ensure-bash-version { # shellcheck disable=SC2004 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]}" + if [ "$(uname)" = 'Darwin' ]; then + echo "On macOS with homebrew 'brew install bash' is sufficient." + fi exit 1 fi }