Blame SOURCES/sdk-telemetry-optout.patch

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