Skip to content

Commit 1055878

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #2351 from PhilipOakley/vcpkg-tip
Vcpkg Install: detect lack of working Git, and note possible vcpkg time outs
2 parents c189765 + 9c28b4d commit 1055878

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

compat/vcbuild/vcpkg_install.bat

+13
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ REM ================================================================
3636

3737
dir vcpkg\vcpkg.exe >nul 2>nul && GOTO :install_libraries
3838

39+
git.exe version 2>nul
40+
IF ERRORLEVEL 1 (
41+
echo "***"
42+
echo "Git not found. Please adjust your CMD path or Git install option."
43+
echo "***"
44+
EXIT /B 1 )
45+
3946
echo Fetching vcpkg in %cwd%vcpkg
4047
git.exe clone https://github.com/Microsoft/vcpkg vcpkg
4148
IF ERRORLEVEL 1 ( EXIT /B 1 )
@@ -73,6 +80,12 @@ REM ================================================================
7380
:sub__install_one
7481
echo Installing package %1...
7582

83+
REM vcpkg may not be reliable on slow, intermittent or proxy
84+
REM connections, see e.g.
85+
REM https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4a8f7be5-5e15-4213-a7bb-ddf424a954e6/winhttpsendrequest-ends-with-12002-errorhttptimeout-after-21-seconds-no-matter-what-timeout?forum=windowssdk
86+
REM which explains the hidden 21 second timeout
87+
REM (last post by Dave : Microsoft - Windows Networking team)
88+
7689
.\vcpkg.exe install %1:%arch%
7790
IF ERRORLEVEL 1 ( EXIT /B 1 )
7891

0 commit comments

Comments
 (0)