From 00434687ebfc70124795edd504e183df3ebe585c Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 19 May 2020 15:22:44 -0700 Subject: [vcpkg] pass -disableMetrics to bootstrap on git bash (#11299) in git bash, we call back into bootstrap-vcpkg.bat, but we don't pass -disableMetrics through. This commit corrects this --- scripts/bootstrap.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 8567fd552..d45305fb5 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -6,14 +6,6 @@ while [ "$vcpkgRootDir" != "/" ] && ! [ -e "$vcpkgRootDir/.vcpkg-root" ]; do vcpkgRootDir="$(dirname "$vcpkgRootDir")" done -# Enable using this entry point on windows from git bash by redirecting to the .bat file. -unixName=$(uname -s | sed 's/MINGW.*_NT.*/MINGW_NT/') -if [ "$unixName" = "MINGW_NT" ]; then - vcpkgRootDir=$(cygpath -aw "$vcpkgRootDir") - cmd "/C $vcpkgRootDir\\bootstrap-vcpkg.bat" || exit 1 - exit 0 -fi - # Argument parsing vcpkgDisableMetrics="OFF" vcpkgUseSystem=false @@ -44,6 +36,20 @@ do fi done +# Enable using this entry point on windows from git bash by redirecting to the .bat file. +unixName=$(uname -s | sed 's/MINGW.*_NT.*/MINGW_NT/') +if [ "$unixName" = "MINGW_NT" ]; then + if [ "$vcpkgDisableMetrics" = "ON" ]; then + args="-disableMetrics" + else + args="" + fi + + vcpkgRootDir=$(cygpath -aw "$vcpkgRootDir") + cmd "/C $vcpkgRootDir\\bootstrap-vcpkg.bat $args" || exit 1 + exit 0 +fi + if [ -z ${VCPKG_DOWNLOADS+x} ]; then downloadsDir="$vcpkgRootDir/downloads" else -- cgit v1.2.3