Blame SOURCES/cli-telemetry-optout.patch

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