hensou / asdf-dotnet

dotnet (.net) plugin for asdf version manager
MIT License
42 stars 10 forks source link

Check and Disable DOTNET_CLI_TELEMETRY_OPTOUT if really enabled #16

Closed hensou closed 10 months ago

hensou commented 1 year ago

Is your feature request related to a problem? Please describe.

It seems that Microsoft enables telemetry by default on the installation of the SDK via the installer script.

Describe the solution you'd like

Telemetry should be disabled by default

Additional context

How to disable telemetry

oleksbabieiev commented 11 months ago

Correct me if I'm wrong, but as far as I know, different shells have different ways of setting global variables, but the vast majority of them support adding export NAME=VALUE to the configuration file. However, it's not so simple, because the configuration file is also different for different shells and can be located in different places. I doubt that disabling telemetry can be automated with a universal shell script. I would just add a warning to README.md. This seems to me to be the simplest and most straightforward solution.

hensou commented 11 months ago

Thanks for you contribution @oleksbabieiev , I'll accept your PR as for now, it is the simplest solution to this.

However, I'm failling to imagine a scenario where adding the variable to the environment would not be enough. I mean, we already do that for the DOTNET_* variables on the set-dotnet-env.{fish,zsh,bash} files, wouldn't that be the same case here?

oleksbabieiev commented 11 months ago

I mean, we already do that for the DOTNET_* variables on the set-dotnet-env.{fish,zsh,bash} files, wouldn't that be the same case here?

Of course, we can do it this way, but it seemed to me that creating a separate script for each shell just to disable telemetry was "too much". But while I was writing this answer, I came up with a pretty interesting idea on how to solve this problem. I am quite busy today and tomorrow, but I will try to implement and test this idea in the coming days.

oleksbabieiev commented 11 months ago

Okay, my "interesting" idea didn't live up to expectations 😂. Perhaps it would have been better to do what you said, just making small adjustments to the existing scripts set-dotnet-env.*, and not reinvent the wheel.