From ebaeda6c23cb84b101bbafaed1a8a39f5c7a9bc3 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Thu, 10 Aug 2023 21:48:13 -0700 Subject: [PATCH] try to find patch.exe in git default installation folder (#17106) ### Description updates the build.bat file in root folder to try best efforts to locate patch.exe. patch.exe is needed to apply patches to some of the dependencies. for example, #17104. However, patch.exe is not available on every windows developer's search path, and if cannot find patch.exe, the build will continue silently. ( as a result, patch is not applied and for patches like #17104, this will cause a build break ) This change adds folder `C:\Program Files\Git\usr\bin` to the PATH, which is the default git installation directory. This may resolve the patch not found issue for most (hopefully) users. --- build.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.bat b/build.bat index 187591191c8e8..d0c6cbcddd669 100644 --- a/build.bat +++ b/build.bat @@ -2,5 +2,9 @@ :: Licensed under the MIT License. @echo off + +setlocal +set PATH=C:\Program Files\Git\usr\bin;%PATH% + rem Requires a Python install to be available in your PATH python "%~dp0\tools\ci_build\build.py" --build_dir "%~dp0\build\Windows" %*