Skip to content

Commit e00ed7d

Browse files
committed
[vcpkg] pass -disableMetrics to bootstrap on git bash
in git bash, we call back into bootstrap-vcpkg.bat, but we don't pass -disableMetrics through. This commit corrects this
1 parent 55be137 commit e00ed7d

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

scripts/bootstrap.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ while [ "$vcpkgRootDir" != "/" ] && ! [ -e "$vcpkgRootDir/.vcpkg-root" ]; do
66
vcpkgRootDir="$(dirname "$vcpkgRootDir")"
77
done
88

9-
# Enable using this entry point on windows from git bash by redirecting to the .bat file.
10-
unixName=$(uname -s | sed 's/MINGW.*_NT.*/MINGW_NT/')
11-
if [ "$unixName" = "MINGW_NT" ]; then
12-
vcpkgRootDir=$(cygpath -aw "$vcpkgRootDir")
13-
cmd "/C $vcpkgRootDir\\bootstrap-vcpkg.bat" || exit 1
14-
exit 0
15-
fi
16-
179
# Argument parsing
1810
vcpkgDisableMetrics="OFF"
1911
vcpkgUseSystem=false
@@ -41,6 +33,20 @@ do
4133
fi
4234
done
4335

36+
# Enable using this entry point on windows from git bash by redirecting to the .bat file.
37+
unixName=$(uname -s | sed 's/MINGW.*_NT.*/MINGW_NT/')
38+
if [ "$unixName" = "MINGW_NT" ]; then
39+
if [ "$vcpkgDisableMetrics" = "ON" ]; then
40+
args="-disableMetrics"
41+
else
42+
args=""
43+
fi
44+
45+
vcpkgRootDir=$(cygpath -aw "$vcpkgRootDir")
46+
cmd "/C $vcpkgRootDir\\bootstrap-vcpkg.bat $args" || exit 1
47+
exit 0
48+
fi
49+
4450
if [ -z ${VCPKG_DOWNLOADS+x} ]; then
4551
downloadsDir="$vcpkgRootDir/downloads"
4652
else

0 commit comments

Comments
 (0)