2020-08-10 15:10:29 +00:00
|
|
|
diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs
|
2020-02-21 01:23:21 +00:00
|
|
|
index de1ebb9e6..6bbf479de 100644
|
2020-08-10 15:10:29 +00:00
|
|
|
--- a/src/Cli/dotnet/Program.cs
|
|
|
|
+++ b/src/Cli/dotnet/Program.cs
|
2020-02-21 01:23:21 +00:00
|
|
|
@@ -28,6 +28,13 @@ public class Program
|
|
|
|
|
|
|
|
public static int Main(string[] args)
|
|
|
|
{
|
|
|
|
+ // opt out of telemetry by default if the env var is unset
|
|
|
|
+ string telemetryValue = Environment.GetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT");
|
|
|
|
+ if (String.IsNullOrEmpty(telemetryValue))
|
|
|
|
+ {
|
|
|
|
+ Environment.SetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
DebugHelper.HandleDebugSwitch(ref args);
|
|
|
|
|
2021-04-15 03:01:46 +00:00
|
|
|
// Capture the current timestamp to calculate the host overhead.
|