vcpkg_install: detect lack of Git

The vcpkg_install batch file depends on the availability of a
working Git on the CMD path. This may not be present if the user
has selected the 'bash only' option during Git-for-Windows install.

Detect and tell the user about their lack of a working Git in the CMD
window.

Fixes #2348.
A separate PR https://github.com/git-for-windows/build-extra/pull/258
now highlights the recommended path setting during install.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
This commit is contained in:
Philip Oakley 2019-10-06 18:40:55 +01:00 committed by Johannes Schindelin
parent 4964c94aad
commit 55bcb60e70

View File

@ -36,6 +36,13 @@ REM ================================================================
dir vcpkg\vcpkg.exe >nul 2>nul && GOTO :install_libraries
git.exe version 2>nul
IF ERRORLEVEL 1 (
echo "***"
echo "Git not found. Please adjust your CMD path or Git install option."
echo "***"
EXIT /B 1 )
echo Fetching vcpkg in %cwd%vcpkg
git.exe clone https://github.com/Microsoft/vcpkg vcpkg
IF ERRORLEVEL 1 ( EXIT /B 1 )