Blame SOURCES/sdk-telemetry-optout.patch

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