mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Ensure bash version at least 5.x
Co-authored-by: Stephen Augustus <justaugustus@users.noreply.github.com> Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
6a161bf6d3
commit
feecef7795
@ -50,6 +50,7 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
|
||||
source "${KUBE_ROOT}/hack/lib/logging.sh"
|
||||
|
||||
kube::log::install_errexit
|
||||
kube::util::ensure-bash-version
|
||||
|
||||
source "${KUBE_ROOT}/hack/lib/version.sh"
|
||||
source "${KUBE_ROOT}/hack/lib/golang.sh"
|
||||
|
@ -729,6 +729,17 @@ function kube::util::ensure_dockerized {
|
||||
fi
|
||||
}
|
||||
|
||||
# kube::util::ensure-bash-version
|
||||
# Check if we are using a supported bash version
|
||||
#
|
||||
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"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# kube::util::ensure-gnu-sed
|
||||
# Determines which sed binary is gnu-sed on linux/darwin
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user