Fix version extraction for oddball Python's with multiline versions.
PiperOrigin-RevId: 236474551
This commit is contained in:
parent
f1bbf1d83e
commit
5060a82990
@ -239,7 +239,7 @@ PIP_WHL_DIR=$(realpath "${PIP_WHL_DIR}") # Get absolute path
|
||||
WHL_PATH=""
|
||||
# Determine the major.minor versions of python being used (e.g., 2.7).
|
||||
# Useful for determining the directory of the local pip installation.
|
||||
PY_MAJOR_MINOR_VER=$(${PYTHON_BIN_PATH} -V 2>&1 | awk '{print $2}' | cut -d. -f-2 | cut -c1-3)
|
||||
PY_MAJOR_MINOR_VER=$(${PYTHON_BIN_PATH} -V 2>&1 | head -n 1 | awk '{print $2}' | cut -d. -f-2 | cut -c1-3)
|
||||
if [[ -z "${PY_MAJOR_MINOR_VER}" ]]; then
|
||||
die "ERROR: Unable to determine the major.minor version of Python."
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user