Selaa lähdekoodia

[core] Correct expression for python version comparison (#3718)

Ayush Goyal 1 vuosi sitten
vanhempi
commit
adfc122fbd
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      tools/relocatable.sh

+ 1 - 2
tools/relocatable.sh

@@ -84,9 +84,8 @@ fi
 export PATH=$(dirname $ENV_PYTHON):$PATH
 
 PYVER=$($ENV_PYTHON -V 2>&1 | awk '{print $2}' | cut -d '.' -f 1,2)
-MIN_VERSION="3.8"
 # Step 1. Fix virtualenv
-if [[ $PYVER == $MIN_VERSION || $PYVER == $MIN_VERSION.* || $PYVER > $MIN_VERSION ]]; then
+if [[ "$PYVER" == "3."[8-9]* || "$PYVER" == "3.10" ]]; then
   echo "Python version is 3.8 or greater"
   pushd .
   cd $HUE_ROOT