-
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
dotnet tool install --global
reinstalls even if the same version is already present
#40818
Comments
@nagilson, this sounds like a recent regression that we probably want to look into. Assigning to you as the resident dotnet-tool expert. |
Hi @Forgind , This is my first time here, can I work on this? Thank you! |
You are definitely free to make a PR and have us take a look :) |
Hey, I changed the code to not reinstall the same version, and now I need help deciding whether I should handle the situation as a success or a failure when trying to install a version that is already present. The #37311 was changed to be a success; should I keep it as a success or change it back to a failure? |
It looks like it was intentional to change that to a success case, so I'd keep it as a success. |
I opened a PR with my changes. |
Describe the bug
dotnet tool install --global
reinstalls even if the same version is already installed. But it should ignore it as in previous .NET SDK versions. This behavior was probably introduced in #37311. This causes the folder with the installed tool to be cleaned up every timedotnet tool install
is called from a build script. Previously, this step was failing. Probably there are some workarounds to keep the previous behavior?To Reproduce
Run
dotnet tool install --global tailwindcss-dotnet --version 1.0.0
when this tool is already installed.To ensure that it tries to reinstall, just open the folder where this tool is installed:
C:\Users\user\.dotnet\tools\.store\tailwindcss-dotnet\1.0.0\tailwindcss-dotnet\1.0.0
in explorer to lock the folder. In that case, it says:Further technical details
The text was updated successfully, but these errors were encountered: