Open cartermp opened 5 years ago
Related https://github.com/dotnet/sdk/issues/11958#issuecomment-753228084
@danmoseley commented on Dec 31, 2020
Incidentally, I found it confusing that
dotnet tool list
is implicitly local. ie, I had a tool installed globally already, and forgot about it. Then I didC:\Users\danmose>dotnet tool install -g dotnet-sos Tool 'dotnet-sos' is already installed.
So naturally I did
C:\Users\danmose>dotnet tool list Package Id Version Commands Manifest --------------------------------------------------- C:\Users\danmose>
Is it too late to make
dotnet tool list
list both local and global?dotnet tool --local --global
is also rejected.
I'd be in favor of this. dotnet tool list
should list all tools, adding a new Type
column to the current display, and if a user wants to filter then -g/--global
would filter to only globals, and a new option --local
would filter to only locals. In effect, dotnet tool list
would behave like a command named dotnet tool list --all
.
Currently,
dotnet tool list
defaults to listing local tools. I think this is a bit unexpected. I'd prefer something like this:The workaround is to do
dotnet tool list -g
to see the global tools I have installed.The existing behavior took me by surprise when a global tool I installed wasn't getting invoked. I tried
dotnet tool list
to see if it was installed, but couldn't find it (since it was installed globally). I had assumed something went horribly wrong, so I attempted to reinstall, but it said it was already installed. A day later someone pointed out thatdotnet tool list -g
was what I needed to run to see if it was installed.