dotnet8.0/sdk-telemetry-optout.patch
Omair Majid 7f6b8ec3f9 Update to .NET SDK 5.0.202 and Runtime 5.0.5
Also make update-release more flexible with optional bug ids and
optional already-built tarballs.
2021-04-14 23:02:35 -04:00

19 lines
751 B
Diff

diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs
index de1ebb9e6..6bbf479de 100644
--- a/src/Cli/dotnet/Program.cs
+++ b/src/Cli/dotnet/Program.cs
@@ -28,6 +28,13 @@ public class Program
public static int Main(string[] args)
{
+ // opt out of telemetry by default if the env var is unset
+ string telemetryValue = Environment.GetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT");
+ if (String.IsNullOrEmpty(telemetryValue))
+ {
+ Environment.SetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
+ }
+
DebugHelper.HandleDebugSwitch(ref args);
// Capture the current timestamp to calculate the host overhead.