Skip to content

Commit

Permalink
Fixed a bug in GitHub Actions (#3933)
Browse files Browse the repository at this point in the history
Now we automatically search for the path to python3 for windows 2019
  • Loading branch information
ya4ept authored Jan 9, 2025
1 parent 101f277 commit df1fb74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build_XSTools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ jobs:
echo "::warning ::cache '${{ runner.os }}-python-${{ matrix.python }}' was NOT found, download the Python2"
echo "== python version check:"
python -V
if ( Test-Path "C:/hostedtoolcache/windows/Python/" ) {
$python_path = python -c "import os, sys; print(os.path.dirname(sys.executable))"
echo $python_path
if ( Test-Path $python_path ) {
echo '== Remove default Python 3:'
echo 'rm -r "C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe"'
rm -r "C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe"
echo "rm -r $python_path\python.exe"
rm -r $python_path\python.exe
}
echo "================================"
echo "== download python ${{ matrix.python }} (${{ matrix.architecture }})"
Expand Down

0 comments on commit df1fb74

Please sign in to comment.