mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
suggest homebrew when bash is too old on macOS
This commit is contained in:
parent
071bdc344e
commit
7f1c6740f7
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user