question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It should return error when run dotnet tool list using non-exist tool path

See original GitHub issue

Steps 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.  image

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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
peterhuenecommented, Mar 29, 2018

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).

0reactions
KathleenDollardcommented, Apr 3, 2018

LGTM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot .NET tool usage issues
The . NET CLI tries to add the default location to the PATH environment variable on its first usage.
Read more >
c# - Installed Dotnet tools give error "Could not execute ...
I'm working on an api in .net core 5 in wsl2 and I followed all the documentation to install the entity framework core...
Read more >
Cannot debug net6.0-macos Apps - Developer Community
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH. It...
Read more >
How to Solve the Command or File Was Not Found EF ...
In this article, we are going to learn how to solve the Command or File Was Not Found EF Core migration error.
Read more >
[Question] Cannot scan dotnet core project - SonarQube
You intended to execute a .NET Core program, but dotnet-sonarscanner does not exist. You intended to run a global tool, but a dotnet-prefixed ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found