Blame SOURCES/sdk-telemetry-optout.patch

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