From bec5f580420fe65289a6bc32ee90d580516f7377 Mon Sep 17 00:00:00 2001 From: Andrew Mildahl Date: Tue, 28 Nov 2023 16:56:51 -0600 Subject: [PATCH] Fix ghe-host-check unsupported version test for unreleased feature versions --- test/test-ghe-host-check.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-ghe-host-check.sh b/test/test-ghe-host-check.sh index 50b4ed99..55f2e6c8 100755 --- a/test/test-ghe-host-check.sh +++ b/test/test-ghe-host-check.sh @@ -68,10 +68,10 @@ begin_test "ghe-host-check detects unsupported GitHub Enterprise Server versions if [ -z "$supported" ] then #BACKUP_UTILS_VERSION WAS NOT FOUND IN LATEST.JSON, CHECK IF ITS GREATER THAN LAST VERSION - if [ "$(version $bu_major_minor)" -ge "$(version ${keys[$((${#keys[@]} - 2 ))]})" ]; then + if [ "$(version $bu_major_minor)" -ge "$(version ${keys[$((${#keys[@]}))]})" ]; then GHE_TEST_REMOTE_VERSION="$bu_major_minor.0" ghe-host-check - GHE_TEST_REMOTE_VERSION="${keys[$(( ${#keys[@]} - 2 ))]}.0" ghe-host-check - GHE_TEST_REMOTE_VERSION="${keys[$(( ${#keys[@]} - 3 ))]}.0" ghe-host-check + GHE_TEST_REMOTE_VERSION="${keys[$(( ${#keys[@]}))]}.0" ghe-host-check + GHE_TEST_REMOTE_VERSION="${keys[$(( ${#keys[@]} - 1 ))]}.0" ghe-host-check fi else #BACKUP_UTILS_VERSION WAS FOUND IN LATEST.JSON