Closed RussKie closed 1 year ago
Hello Igor and thanks for contacting us. I guess this text is intended to inform users that this script is really meant to be only for CI environment. @baronfel, we have few options here.
1) Log these messages as "verbose", but users will not be informed about "unexpected" behavior. 2) Add parameter that would disable writing this info. 3) Something else :)
What do you think?
- Log these messages as "verbose", but users will not be informed about "unexpected" behavior.
I'd like to think our users sufficiently intelligent to be able to read the docs or call Get-Help dotnet-install.ps1
to find out the script's purpose. To me the fact that users are using this script is an indication they are aware what they are doing. Else - see the step one :)
I'm finding it a bigger issue that we're needlessly consuming compute and emitting console noise.
Our users are intelligent, but it happens that this script is used outside CI which brings some "oddities" like lifetime of updated environment variable :) We still have to deal with questions, why the dotnet doesn't work when installed this way.
@baronfel, what modification would you prefer?
We should get a bit more clarity on who mostly uses this script. The majority as far as I know are:
None of these are 'interactive', and all accept the contract of knowing the PATH has been updated. I think this is a pretty strong case for reducing the verbosity at this point (or at least allowing a flag, which Say-Verbose I think handles currently).
That said, this is not a high priority for the team to do given other commitments for .NET 8 at this time. This falls squarely in the 'if contributed we'd be happy to merge' category.
My global.json looks like this
And when I restore the toolset (essentially invoking![image](https://user-images.githubusercontent.com/4403806/219987238-e872205a-74a9-4fb6-a1f7-a38634eca1f3.png)
install-dotnet.ps1
under covers) the output is too verbose:And there's no way to suppress this notification: https://github.com/dotnet/install-scripts/blob/590932815dc4104e9bec3fa517e247b07b7792ac/src/dotnet-install.ps1#L1113-L1116 https://github.com/dotnet/install-scripts/blob/590932815dc4104e9bec3fa517e247b07b7792ac/src/dotnet-install.ps1#L125-L133
I'd like to be able to disable this notification. Perhaps, the only information could be valuable (~ironically, the most important part of it's missing in
Attempting to install dotnet from public location.
~ this is the Arcade SDK's doing) is something like this:I'd venture to say that emitting this text by default we're wasting millions of hours of compute. This notification should be in the docs and shown when
-help
is invoked.