Blame SOURCES/sdk-telemetry-optout.patch

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