Blame SOURCES/sdk-telemetry-optout.patch

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