Blame SOURCES/cli-telemetry-optout.patch

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