Open jinek opened 2 years ago
Think it may relate to a bad network for the NuGet
We've got a 10-second hard-coded cancellation timespan in the code, and we don't do any special handling of the cancellation exception. We should do better and present the user with a more useful error message if we can't contact nuget in a reasonable time. I think it's also reasonable to expand this 10s timespan - the default HttpClient timeout is 100s, and a DNS query has a maximum duration of 15s, so something longer might be better to allow the DNS resolution to fully fail.
Alternatively - System.CommandLine supports creating and forwarding CancellationTokens that respond to user cancellation, and we should take one of those and flow it down into this call instead. That puts the user in complete control.
Hello! I see cli command
dotnet tool search
sometimes exits with code 1 and prints exception to error output. I can not reproduce the issue, not sure if may be my system tries to shutdown the process?I am sorry, I don't have the stacktrace, I only have part of output left in my custom UI.
Exceptions (if any)
TaskCancelledException SocketException
Further technical details
ShellExecute
viaCLIWrap
library dotnet --info: