There is no AGENT_TOOLSDIRECTORY on GitHub images (#21)

This change reflects what the Windows installer already does:  c0e7ef2c3c/installers/win-setup-template.ps1 (L82-L87)
This commit is contained in:
Martijn Pieters 2020-05-05 12:07:17 +01:00 committed by GitHub
parent e6805b9e59
commit f75c0e6e4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,14 @@ PYTHON_MAJOR_DOT_MINOR=python$MAJOR_VERSION.$MINOR_VERSION
PYTHON_MAJORMINOR=python$MAJOR_VERSION$MINOR_VERSION
PYTHON_FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$BUILD_VERSION
PYTHON_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/Python
if [ -z ${AGENT_TOOLSDIRECTORY+x} ]; then
# No AGENT_TOOLSDIRECTORY on GitHub images
TOOLCACHE_ROOT=$RUNNER_TOOL_CACHE
else
TOOLCACHE_ROOT=$AGENT_TOOLSDIRECTORY
fi
PYTHON_TOOLCACHE_PATH=$TOOLCACHE_ROOT/Python
PYTHON_TOOLCACHE_VERSION_PATH=$PYTHON_TOOLCACHE_PATH/$PYTHON_FULL_VERSION
PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/x64
@ -47,4 +54,4 @@ echo "Upgrading PIP..."
./python -m pip install --ignore-installed pip
echo "Create complete file"
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete