Skip to content

Commit f86b143

Browse files
borsehuss
authored andcommitted
Auto merge of rust-lang#81762 - pietroalbini:fix-install-msys2, r=m-ou-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`
1 parent 1cd0303 commit f86b143

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ci/scripts/install-msys2.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ if isWindows; then
2424
# baked in which break LLVM's build system one way or another, so let's use the
2525
# native version which keeps everything as native as possible.
2626
python_home="/c/hostedtoolcache/windows/Python/${native_python_version}/x64"
27-
cp "${python_home}/python.exe" "${python_home}/python3.exe"
27+
if ! [[ -f "${python_home}/python3.exe" ]]; then
28+
cp "${python_home}/python.exe" "${python_home}/python3.exe"
29+
fi
2830
ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\${native_python_version}\\x64"
2931
ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\${native_python_version}\\x64\\Scripts"
3032
fi

0 commit comments

Comments
 (0)