File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 19
19
set -ex
20
20
21
21
# Find the latest Python binary in build/env/bin
22
- LATEST_PYTHON=$( find " $HUE_HOME_DIR /build/env/bin" -name " python3*" -exec basename {} \; | sort -V | tail -n 1)
22
+ LATEST_PYTHON=$( [ -d " $HUE_HOME_DIR /build/env/bin " ] && find " $HUE_HOME_DIR /build/env/bin" -name " python3*" -exec basename {} \; | sort -V | tail -n 1 || echo " " )
23
23
24
24
# Extract version from the latest python binary (e.g., python3.11 → 3.11)
25
- LATEST_PYTHON_VERSION=$( echo " $LATEST_PYTHON " | grep -oP ' \d+\.\d+' )
25
+ LATEST_PYTHON_VERSION=$( echo " $LATEST_PYTHON " | grep -oP ' \d+\.\d+' || echo " " )
26
26
27
27
# Find all supported python versions from build/venvs and include latest version
28
28
readarray -t SUPPORTED_VERSIONS < <(
29
29
(
30
- find " $HUE_HOME_DIR /build/venvs" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | grep -oP ' \d+\.\d+' ;
30
+ [ -d " $HUE_HOME_DIR /build/venvs " ] && find " $HUE_HOME_DIR /build/venvs" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | grep -oP ' \d+\.\d+'
31
31
echo " $LATEST_PYTHON_VERSION "
32
32
) | sort -Vr | uniq
33
33
)
You can’t perform that action at this time.
0 commit comments