It should return error when run dotnet tool list using non-exist tool path
See original GitHub issueSteps to reproduce
Run dotnet tool list --tool-path “~/non-exist-path”
Expected behavior
It should return error path
Actual behavior
The output shows the table header with package id, version, and commands.
Environment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.1.300-preview2-008407
Commit: 5a5e35c
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/2.1.300-preview2-008407/
Host (useful for support):
Version: 2.1.0-preview2-26326-03
Commit: 01c8d79c6a
.NET Core SDKs installed:
2.1.300-preview2-008407 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0-preview2-30478 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0-preview2-30478 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.0-preview2-26326-03 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I’m in agreement that we should probably throw
GracefulException
if the given path doesn’t exist. For example, if I mistyped the path, I’d expect the tool to let me know rather than just showing empty, as there’s no way to know the difference between a bad path or an empty tools directory.For install, there shouldn’t be an error because it creates the directory.
For uninstall, it will error because it can’t find the tool package to uninstall (although, it should probably have the same error as list).
LGTM