aboutsummaryrefslogtreecommitdiff
path: root/scripts/bootstrap.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bootstrap.ps1')
-rw-r--r--scripts/bootstrap.ps19
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index 67a4bbbef..018ba3f99 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -370,7 +370,6 @@ else
$arguments = (
"`"/p:VCPKG_VERSION=-unknownhash`"",
-"`"/p:DISABLE_METRICS=$disableMetricsValue`"",
"/p:Configuration=Release",
"/p:Platform=$platform",
"/p:PlatformToolset=$platformToolset",
@@ -413,8 +412,14 @@ if ($ec -ne 0)
Write-Host "`nBuilding vcpkg.exe... done.`n"
-if (-not $disableMetrics)
+if ($disableMetrics)
+{
+ Set-Content -Value "" -Path "$vcpkgRootDir\vcpkg.disable-metrics" -Force
+}
+elseif (-Not (Test-Path "$vcpkgRootDir\vcpkg.disable-metrics"))
{
+ # Note that we intentionally leave any existing vcpkg.disable-metrics; once a user has
+ # opted out they should stay opted out.
Write-Host @"
Telemetry
---------