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

CLI update advisory needs to be aware of the executing tool's location #1769

Closed
Xeevis opened this issue Sep 18, 2019 · 0 comments · Fixed by #1814
Closed

CLI update advisory needs to be aware of the executing tool's location #1769

Xeevis opened this issue Sep 18, 2019 · 0 comments · Fixed by #1814
Labels
Milestone

Comments

@Xeevis
Copy link
Contributor

Xeevis commented Sep 18, 2019

Commit by @ebicoglu d372b9c introduced regression in a way user is advised to update to a new version. New code assumes tool is always in a default (global) location which is:

OS Path
Linux/macOS $HOME/.dotnet/tools
Windows %USERPROFILE%\.dotnet\tools

This however won't be the case if tool is installed with --tool-path switch. To demonstrate how would that be problematic:

PS> dotnet tool install --tool-path "C:\AbpTool" Volo.Abp.Cli
PS> C:\AbpTool\abp
[21:56:55 WRN] ABP CLI has a newer stable version ...
[21:56:55 WRN] Update Command:
[21:56:55 WRN] dotnet tool update -g Volo.Abp.Cli
PS> dotnet tool update -g Volo.Abp.Cli
Tool 'volo.abp.cli' is not currently installed.

This is the reason why -g wasn't used in the advisory, with --tool-path it works universally, no matter where is the tool installed. It's possible to use -g, but it's necessary to first determine if executing tool is indeed in it's default location.

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

Successfully merging a pull request may close this issue.

2 participants