Blame SOURCES/sdk-telemetry-optout.patch

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