From 087e1d803632e86e2be743bcbe16425cbea3a797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MACHIZAUD=20Andr=C3=A9a?= Date: Sat, 18 Jun 2022 17:15:28 +0200 Subject: [PATCH] Fail with error code if install_vcpkg_dependencies.bat commands fail --- vcpkg/install_vcpkg_dependencies.bat | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vcpkg/install_vcpkg_dependencies.bat b/vcpkg/install_vcpkg_dependencies.bat index da8145f1..d858a660 100644 --- a/vcpkg/install_vcpkg_dependencies.bat +++ b/vcpkg/install_vcpkg_dependencies.bat @@ -1,14 +1,17 @@ @echo off +setlocal pushd %~dp0 REM get vcpkg distribution -if not exist vcpkg git clone https://github.com/Microsoft/vcpkg.git +if not exist vcpkg git clone https://github.com/Microsoft/vcpkg.git || exit /b 1 REM build vcpkg -if not exist vcpkg\vcpkg.exe call vcpkg\bootstrap-vcpkg.bat -disableMetrics +if not exist vcpkg\vcpkg.exe call vcpkg\bootstrap-vcpkg.bat -disableMetrics || exit /b 2 + +set VCPKG_ROOT=%cd%\vcpkg REM install required packages -vcpkg\vcpkg.exe install --triplet x64-windows-static +vcpkg\vcpkg.exe install --triplet x64-windows-static || exit /b 3 popd