From 2414c46c81615ff9f090de40bb23003bbfe48a01 Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Fri, 24 Dec 2021 11:26:10 +0700 Subject: [PATCH] tools/install: Recommend updating Bash version to 4 or higher Co-authored-by: Koichi Murase --- tools/install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 03e3a79a8..4cfb4bd44 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -9,9 +9,12 @@ if [ -z "${BASH_VERSION-}" ]; then fi if [[ ! ${BASH_VERSINFO[0]-} ]] || ((BASH_VERSINFO[0] < 3 || BASH_VERSINFO[0] == 3 && BASH_VERSINFO[1] < 2)); then - printf "Error: Bash 3.2 required for Oh My Bash.\n" - printf "Error: Upgrade Bash and try again.\n" + printf "Error: Bash 3.2 required for Oh My Bash.\n" >&2 + printf "Error: Upgrade Bash and try again.\n" >&2 return 2 &>/dev/null || exit 2 +elif ((BASH_VERSINFO[0] < 4)); then + printf "Warning: Bash >=4 is no longer required for Oh My Bash but is cool to have ;)\n" >&2 + printf "Warning: Why don't you upgrade your Bash to 4 or higher?\n" >&2 fi _omb_install_print_usage() {