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

provide support for dotnet tool install -U / --upgrade #9669

Closed
damageboy opened this issue Aug 16, 2018 · 5 comments
Closed

provide support for dotnet tool install -U / --upgrade #9669

damageboy opened this issue Aug 16, 2018 · 5 comments
Assignees
Milestone

Comments

@damageboy
Copy link
Contributor

Steps to reproduce

$ dotnet tool install -g dotnetsay --version 2.1.3   
You can invoke the tool using the following command: dotnetsay
Tool 'dotnetsay' (version '2.1.3') was successfully installed.
$ dotnet tool install -g dotnetsay --version 2.1.4
Tool 'dotnetsay' is already installed.

Expected behavior

dotnet tool install should allow a proper upgrade switch / command to avoid the needless (and less script friendly) workaround to always try to do dotnet list -g => dotnet tool uninstall -g => dotnet tool install -g for a simple upgrade

Actual behavior

Upgrade doesn't magically happen.

Environment data

.NET Core SDK (reflecting any global.json):
 Version:   2.1.302
 Commit:    9048955601

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.1.302/

Host (useful for support):
  Version: 2.1.2
  Commit:  811c3ce6c0

.NET Core SDKs installed:
  2.1.302 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
@ThatRendle
Copy link
Contributor

There is an upgrade command:

dotnet tool upgrade -g dotnetsay

@damageboy
Copy link
Contributor Author

damageboy commented Aug 16, 2018

I know, but as far as I can tell I can't specify the version on the update, it seems geared to updating to the latest stable.

I am looking for a fool proof way of installing a bunch of dotnet tools as part of an orchestration script.

So ideally, I have something that is idempotent, I run dotnet .... --version 3.1.4 and whatever the current state is, I get the desired version...

Does that make sense?

Again, I'm stressing that this is the default state with apt: apt install xxx=3.1.4 and pip: pip install -U numpy=1.14 as examples

@livarcocc
Copy link
Contributor

@peterhuene @wli3

@wli3 wli3 self-assigned this Aug 17, 2018
@wli3
Copy link

wli3 commented Oct 23, 2018

Please continue comment this issues if you think dotnet/cli#10205 cannot solve the problem of your scenario and I will reopen it

@wli3 wli3 closed this as completed Oct 23, 2018
@damageboy
Copy link
Contributor Author

dotnet/cli#10205 is a great fix for this issue as far as I'm concerned thanks!

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 3.0.1xx milestone Jan 31, 2020
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

5 participants