Blame SOURCES/cli-telemetry-optout.patch

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