aboutsummaryrefslogtreecommitdiff
path: root/scripts/bootstrap.ps1
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2021-01-13 14:06:06 -0800
committerGitHub <noreply@github.com>2021-01-13 14:06:06 -0800
commit8414e15973097e70fe40149e922c402799804b3d (patch)
treeca46f3f317f0eef7924f3b76828868d51bb249cf /scripts/bootstrap.ps1
parent4da47f758fb5e02fc017047e014d15174b85a848 (diff)
downloadvcpkg-8414e15973097e70fe40149e922c402799804b3d.tar.gz
vcpkg-8414e15973097e70fe40149e922c402799804b3d.zip
[vcpkg] Use a tag file rather than conditional compilation to permanently disable metrics. (#15470)
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
---------