-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve dotnet tool install/update experience #9282
Comments
If this is for CI, should you be installing the tool globally? For CI, I would imagine you would want to use the --tool-path option to install the tool in a location under your repo, that the CI machine could then clean up after the build has run. This way, you would have complete control over which global tools are being used by your build. |
@livarcocc I think we could make it work with the --tool-path option, since our build environment should be clean each run. It would still be nice for a single command install/update, we have some other tools planned for end-users for their development machines. The experience would be much cleaner if they can just run a single command to ensure they have installed and are running the latest version. Thanks! |
It is good for usability. However, the advantage of explicit and strict is the state transition is narrow. It is easy to understand and control action. With maybe |
I'm fine using update for this. We need to work on the switch name. |
|
@KathleenDollard and @wli3 please reach out an agreement on what the experience should be here and update this document with the changes we are going to make. |
@KathleenDollard |
What syntax are we currently planning? I assume this is what we want to recommend for CI where the version number should roll forward. |
Please continue comment this issues if you think dotnet/cli#10205 cannot solve the problem of your scenario and I will reopen it |
Except that using All I want to do is install the tool if it doesn't exist without having to download any extra binaries. Why does this have to be so complicated? |
For the purposes of build automation, it would be helpful for 'dotnet tool install' to either update or return a positive exit code if the tool is already installed. Likewise, 'dotnet tool update' might install the tool if not already installed.
We are basically looking for a clean way to ensure a global tool is installed and updated at runtime, preferably with a single command. It seems most error code responses are 1, so it is difficult to determine what the error is.
Some examples of current behavior:
Then, when running with version 1.0.1 available of the same tool:
If I try to run update without the tool installed:
One potential flow that would be useful:
(new tool version published)
The text was updated successfully, but these errors were encountered: