From eb6f3c949e04c486519a9e97de15788e1c8ceb94 Mon Sep 17 00:00:00 2001 From: ambrosin Date: Fri, 5 Apr 2024 13:59:30 -0700 Subject: [PATCH] Use the correct pyenv path in Kokoro macOS PiperOrigin-RevId: 622275210 --- kokoro/testutils/install_python3.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kokoro/testutils/install_python3.sh b/kokoro/testutils/install_python3.sh index ce3d832fb5..2a46ef10cc 100755 --- a/kokoro/testutils/install_python3.sh +++ b/kokoro/testutils/install_python3.sh @@ -39,7 +39,8 @@ install_python3() { python_version="${1:-${DEFAULT_PYTHON_VERSION}}" # Update the list of Python versions. ( - cd /home/kbuilder/.pyenv/plugins/python-build/../.. + # The macOS image exports a PYENV_ROOT env variable. + cd "${PYENV_ROOT:-"${HOME}/.pyenv"}" git pull ) # Install Python.