Blame SOURCES/cli-telemetry-optout.patch

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