dotnet3.1/cli-telemetry-optout.patch
Petr Šabata 63a0159abe RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/dotnet3.1#11bc30a3d19a0c0adc112cd6c34a288c7dac64a2
2020-10-14 23:49:41 +02:00

19 lines
725 B
Diff

diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs
index de1ebb9e6..6bbf479de 100644
--- a/src/dotnet/Program.cs
+++ b/src/dotnet/Program.cs
@@ -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);
new MulticoreJitActivator().TryActivateMulticoreJit();