Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet tool list should list global tools as well #4264

Open
cartermp opened this issue Nov 6, 2019 · 2 comments
Open

dotnet tool list should list global tools as well #4264

cartermp opened this issue Nov 6, 2019 · 2 comments

Comments

@cartermp
Copy link
Contributor

cartermp commented Nov 6, 2019

Currently, dotnet tool list defaults to listing local tools. I think this is a bit unexpected. I'd prefer something like this:

dotnet tool list

Package Id (...)
----------- (...)
foobar
bazqux (global)
dotnet-try (global)

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 that dotnet tool list -g was what I needed to run to see if it was installed.

@msftgits msftgits transferred this issue from dotnet/toolset Jan 31, 2020
rainersigwald pushed a commit that referenced this issue Jul 20, 2020
…208.4 (#4264)

- Microsoft.Net.Compilers.Toolset - 3.5.0-beta3-20108-04
@augustoproiete
Copy link

augustoproiete commented Feb 2, 2021

Related #11958 (comment)

@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 did

C:\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.

@baronfel
Copy link
Member

baronfel commented Mar 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants