From 56f81b44331ce8940ed9e06ad2b235ecf2aefa1e Mon Sep 17 00:00:00 2001 From: Liam <33645555+lj3954@users.noreply.github.com> Date: Fri, 7 Jun 2024 19:29:33 -0700 Subject: [PATCH] fix: correctly escape characters in edition/lang validation. Closes #1270 --- quickget | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index 93eb0b76b4..9c65b42765 100755 --- a/quickget +++ b/quickget @@ -199,7 +199,7 @@ function error_not_supported_release() { } function error_not_supported_edition() { - if [[ ! "${EDITIONS[*]}" =~ ${EDITION} ]]; then + if [[ ! "${EDITIONS[*]}" = *"${EDITION}"* ]]; then echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n" echo -n ' - Supported editions: ' for EDITION in "${EDITIONS[@]}"; do @@ -3482,8 +3482,6 @@ if [ -n "${2}" ]; then if [[ $(type -t "editions_${OS}") == function ]]; then validate_release "releases_${OS}" EDITIONS=("$(editions_"${OS}")") - # Default to the first edition if none is specified. - EDITION=${EDITIONS[0]} if [ -n "${3}" ]; then EDITION="${3}" error_not_supported_edition @@ -3511,7 +3509,7 @@ if [ -n "${2}" ]; then "languages_${OS}" if [ -n "${3}" ]; then I18N="${3}" - if [[ ! "${I18NS[*]}" =~ ${I18N} ]]; then + if [[ ! "${I18NS[*]}" = *"${I18N}"* ]]; then error_not_supported_lang fi VM_PATH="$(echo "${OS}-${RELEASE}-${I18N// /-}" | tr -d '()')"