File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11@ ECHO off
22
3- SET " PYTHON_REF = https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe"
4- SET PYTHON = " %ProgramFiles% \Python310\python.exe"
5- SET PIP = " %ProgramFiles% \Python310\Scripts\pip3.exe"
3+ setlocal enableDelayedExpansion
4+
5+ set " PYTHON_REF = https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe"
6+ set PYTHON = " python.exe"
7+ set PIP = " pip3.exe"
8+ if " %RUNNER_TOOL_CACHE% " == " " (
9+ echo Running on a local maching builder
10+ set PYTHON = " %ProgramFiles% \Python310\python.exe"
11+ )
12+ if " %RUNNER_TOOL_CACHE% " == " " (
13+ set PIP = " %ProgramFiles% \Python310\Scripts\pip3.exe"
14+ )
615
716curl %PYTHON_REF% --output python-install.exe
817python-install.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 Include_launcher=0
918%PYTHON% -m pip install --upgrade pip
1019
1120echo Python version is:
12- %PYTHON% --version || python --version
21+ %PYTHON% --version
1322
1423echo PIP version is:
15- %PIP% --version || pip --version
24+ %PIP% --version
You can’t perform that action at this time.
0 commit comments