diff --git a/images/linux/scripts/installers/1604/hosted-tool-cache.sh b/images/linux/scripts/installers/1604/hosted-tool-cache.sh index efaaa02ff..00a2e9bd4 100644 --- a/images/linux/scripts/installers/1604/hosted-tool-cache.sh +++ b/images/linux/scripts/installers/1604/hosted-tool-cache.sh @@ -37,6 +37,15 @@ done; pypys=$(ls $AGENT_TOOLSDIRECTORY/PyPy) for pypy in $pypys; do DocumentInstalledItemIndent "PyPy $pypy" + + # Add symlinks for pypy2 and pypy3 to usr/local/bin, there should only be 2 versions of PyPy in the tools cache that is downloaded + if [ ${pypy:0:1} -eq "3" ] ; then + # add pypy 3.X to PATH + ln -s $AGENT_TOOLSDIRECTORY/PyPy/$pypy/x64/bin/pypy3 /usr/local/bin/pypy3 + else + # add pypy 2.X to PATH + ln -s $AGENT_TOOLSDIRECTORY/PyPy/$pypy/x64/bin/pypy /usr/local/bin/pypy + fi done; DocumentInstalledItem "Ruby (available through the [Use Ruby Version](https://go.microsoft.com/fwlink/?linkid=2005989) task)" diff --git a/images/linux/scripts/installers/1804/hosted-tool-cache.sh b/images/linux/scripts/installers/1804/hosted-tool-cache.sh index b63c8f102..ab4046585 100644 --- a/images/linux/scripts/installers/1804/hosted-tool-cache.sh +++ b/images/linux/scripts/installers/1804/hosted-tool-cache.sh @@ -37,6 +37,15 @@ done; pypys=$(ls $AGENT_TOOLSDIRECTORY/PyPy) for pypy in $pypys; do DocumentInstalledItemIndent "PyPy $pypy" + + # Add symlinks for pypy2 and pypy3 to usr/local/bin, there should only be 2 versions of PyPy in the tools cache that is downloaded + if [ ${pypy:0:1} -eq "3" ] ; then + # add pypy 3.X to PATH + ln -s $AGENT_TOOLSDIRECTORY/PyPy/$pypy/x64/bin/pypy3 /usr/local/bin/pypy3 + else + # add pypy 2.X to PATH + ln -s $AGENT_TOOLSDIRECTORY/PyPy/$pypy/x64/bin/pypy /usr/local/bin/pypy + fi done; DocumentInstalledItem "Ruby (available through the [Use Ruby Version](https://go.microsoft.com/fwlink/?linkid=2005989) task)" diff --git a/images/linux/scripts/installers/python.sh b/images/linux/scripts/installers/python.sh index 4a611c637..ecbb5ac24 100644 --- a/images/linux/scripts/installers/python.sh +++ b/images/linux/scripts/installers/python.sh @@ -12,7 +12,7 @@ apt-get install -y --no-install-recommends python python-dev python-pip python3 # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" -for cmd in python python3; do +for cmd in python pip python3 pip3; do if ! command -v $cmd; then echo "$cmd was not installed or not found on PATH" exit 1