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

--local option is not documented #11958

Open
alexandair opened this issue Jun 8, 2020 · 6 comments
Open

--local option is not documented #11958

alexandair opened this issue Jun 8, 2020 · 6 comments
Assignees
Milestone

Comments

@alexandair
Copy link

--local option is not documented.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@Youssef1313
Copy link
Member

The current docs says:

  • A local tool. Omit the --global and --tool-path options.

So, it seems that dotnet tool list --local is equivalent to just dotnet tool list. However, I surely agree that it needs to be documented.

I'll wait until @tdykstra review this, and confirm that dotnet tool list --local is the same as dotnet tool list, then I can submit a PR.

@tdykstra
Copy link
Contributor

tdykstra commented Jun 8, 2020

@wli3 -- Is dotnet tool list the same as dotnet tool list --local?

And why does the command's --help output show PATH in the description -- when I try to specify a path with --local it responds unrecognized command or argument

dotnet tool list -h
Usage: dotnet tool list [options]

Options:
  -g, --global         List tools installed for the current user.
  --local              PATH
  --tool-path <PATH>   The directory containing the tools to list.
  -h, --help           Show command line help.

@wli3
Copy link

wli3 commented Jun 8, 2020

dotnet tool list should be the same as dotnet tool list --local. Looks like "unrecognized command or argument" is a bug

@wli3 wli3 transferred this issue from dotnet/docs Jun 8, 2020
@wli3 wli3 self-assigned this Jun 8, 2020
@wli3 wli3 modified the milestones: 6.0.1xx, Backlog Jun 8, 2020
@alexandair
Copy link
Author

alexandair commented Jun 8, 2020

"unrecognized command or argument" is not a bug. --local option doesn't accept any value.

--help output show PATH in the description -- and, that's a bug

Description for both dotnet tool list and dotnet tool list --local should be something like:

Lists all local tools available in the current directory.

@danmoseley
Copy link
Member

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.

@augustoproiete
Copy link

@danmosemsft +1. It would be great if that was done together with #14626 so that when you see a tool in the list, you know you can run it with the same command without having to worry about it being a local tool vs a global tool.

The executable shim should be generated for local tools as well (it isn't today), and dotnet <toolCommandName> should work regardless if the tool was installed as local or global (it doesn't work for global tools).

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

7 participants