Skip to content

Commit

Permalink
Auto merge of rust-lang#81762 - pietroalbini:fix-install-msys2, r=m-o…
Browse files Browse the repository at this point in the history
…u-se

CI: only copy python.exe to python3.exe if the latter does not exist

We're copying the binary to make sure we can call `python3.exe` around, but it seems like the base image of GitHub Actions changed, copying the file before we do so. This PR changes the CI script to only copy the file if it doesn't already exist.

r? `@m-ou-se`
cc `@Mark-Simulacrum`
  • Loading branch information
bors authored and ehuss committed Feb 5, 2021
1 parent 1cd0303 commit f86b143
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ci/scripts/install-msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ if isWindows; then
# baked in which break LLVM's build system one way or another, so let's use the
# native version which keeps everything as native as possible.
python_home="/c/hostedtoolcache/windows/Python/${native_python_version}/x64"
cp "${python_home}/python.exe" "${python_home}/python3.exe"
if ! [[ -f "${python_home}/python3.exe" ]]; then
cp "${python_home}/python.exe" "${python_home}/python3.exe"
fi
ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\${native_python_version}\\x64"
ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\${native_python_version}\\x64\\Scripts"
fi

0 comments on commit f86b143

Please sign in to comment.