From 8c754e4939f85e004290f4ba130902fdc92fcbf2 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Sat, 22 Aug 2020 18:06:30 -0700 Subject: [PATCH] windows: ensure input line endings are used in Git checkout Otherwise they could be normalized to CRLF depending on Git's default settings and sh.exe would choke. Closes #54. --- cpython-windows/build.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cpython-windows/build.py b/cpython-windows/build.py index fcfb6b11..5c60b554 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -1424,6 +1424,8 @@ def build_libffi( subprocess.run( [ "git.exe", + "-c", + "core.autocrlf=input", "clone", "--single-branch", "--branch", @@ -1435,7 +1437,13 @@ def build_libffi( ) subprocess.run( - ["git.exe", "checkout", "ed22026f39b37f892ded95d7b30e77dfb5126334"], + [ + "git.exe", + "-c", + "core.autocrlf=input", + "checkout", + "ed22026f39b37f892ded95d7b30e77dfb5126334", + ], cwd=ffi_source_path, check=True, )