diff --git a/bootstrap/win/win_tools.bat b/bootstrap/win/win_tools.bat index 36cdc578ad..de121f9816 100644 --- a/bootstrap/win/win_tools.bat +++ b/bootstrap/win/win_tools.bat @@ -26,6 +26,18 @@ if "%1" == "force" ( :PYTHON_CHECK +:: Support revert from https://chromium-review.googlesource.com/c/563036 +:: +:: If the "python.bat" from that CL is installed, we will not know to +:: replace it if the CL is reverted. To support this, we will actively +:: destroy our "python.bat" if we detect a "python_bin_reldir.txt" file +:: present, causing us to reinstall Python. +if exist "%WIN_TOOLS_ROOT_DIR%\python_bin_reldir.txt" ( + del "%WIN_TOOLS_ROOT_DIR%\python.bat" + del "%WIN_TOOLS_ROOT_DIR%\python_bin_reldir.txt" + goto :PY27_INSTALL +) + if not exist "%WIN_TOOLS_ROOT_DIR%\python276_bin" goto :PY27_INSTALL if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY27_INSTALL set ERRORLEVEL=0