Ver Fonte

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

Ayush Goyal há 1 ano atrás
pai
commit
adfc122fbd
1 ficheiros alterados com 1 adições e 2 exclusões
  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