From f47e574c875c521244cdb30f271714d4bf20294d Mon Sep 17 00:00:00 2001 From: Kerkko Pelttari Date: Tue, 7 Apr 2020 10:31:26 +0300 Subject: Apply suggestions from code review Improve error message for unsupported bash version, use double square bracket operator Co-Authored-By: Daniel Hahler --- scripts/vim-patch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index ba0e7f62dd..e844d2951c 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -6,8 +6,8 @@ set -u set -p # Ensure that the user has a bash that supports -A -if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then - echo "Update your bash version to one that supports -A syntax (>3)" +if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then + echo "This script requires bash version 3 or later (you have ${BASH_VERSION})." >&2 exit 1 fi -- cgit