From 678effd0fd13d5edb265fb2e9e2c09ea63f72054 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 5 Aug 2024 03:00:32 +0000 Subject: automatic import of dotnet6.0 --- sdk-telemetry-optout.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sdk-telemetry-optout.patch (limited to 'sdk-telemetry-optout.patch') diff --git a/sdk-telemetry-optout.patch b/sdk-telemetry-optout.patch new file mode 100644 index 0000000..d6e6464 --- /dev/null +++ b/sdk-telemetry-optout.patch @@ -0,0 +1,18 @@ +diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs +index de1ebb9e6..6bbf479de 100644 +--- a/src/Cli/dotnet/Program.cs ++++ b/src/Cli/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); + + // Capture the current timestamp to calculate the host overhead. -- cgit v1.2.3