-
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
Add automatically tool upgrade and downgrade for different versions for dotnet tool install #37311
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…dd automatic upgrade for ToolUpdateCommand; Add --allow-downgrade feature
dotnet-issue-labeler
bot
added
Area-Infrastructure
untriaged
Request triage from a team member
labels
Dec 4, 2023
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
dsplaisted
approved these changes
Dec 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
We should probably have test cases for each of the different behaviors in the PR description, for global and local tools. Probably some of those cases are already covered.
src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-tool/update/LocalizableStrings.resx
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs
Outdated
Show resolved
Hide resolved
src/Tests/dotnet.Tests/CommandTests/ToolUpdateGlobalOrToolPathCommandTests.cs
Show resolved
Hide resolved
dsplaisted
approved these changes
Jan 8, 2024
src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-tool/update/LocalizableStrings.resx
Outdated
Show resolved
Hide resolved
JL03-Yue
added
Area-Tools
and removed
untriaged
Request triage from a team member
Area-Infrastructure
labels
Apr 12, 2024
Forgind
pushed a commit
that referenced
this pull request
Jun 27, 2024
Fixes #40818 Context Following the changes introduced in #37311, the dotnet tool install --global command began reinstalling tools that were already installed, which involved deleting and then adding the same tool version again. Before this release, it was not possible to install a version that was already installed. This behavior change was reported in #40818. I propose a modification to avoid reinstalling tools that are already installed. Change The current installation flow involves uninstalling all matching tools and then installing them again. My change modifies this flow by first checking if the requested best match package version is already installed. If it is, the flow is stopped, and a message is printed: 'Tool '{0}' is already installed'.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#9500
Update dotnet tool install for global or local tools so that it support automatic upgrade, downgrade, and error-throwing behaviors.
behaviors
User cases