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

9500 dotnet tool install: Add automatically tool upgrade and downgrade when specify version #31549

Closed
wants to merge 10 commits into from

Conversation

JL03-Yue
Copy link
Member

#9500

Update dotnet tool install so that it support automatic upgrade, downgrade, and error-throwing behaviors.

  • If the command doesn't specify version, the latest version is installed. Exit code = 0
  • If the command specify version 3.0.0 and version 3.0.0 is installed, do nothing. Exit code = 0
  • If the command specify version 3.0.0 and version 2.0.0 is installed, upgrade to 3.0.0. Exit code = 0
  • If the command specify version 3.0.0 without --allow-downgrade flag and version 4.0.0 is installed, it throws out an error.
  • If the command specify version 3.0.0 with--allow-downgrade flag and version 4.0.0 is installed, downgrade to 3.0.0. Exit code = 0

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Mar 30, 2023
…it-0

Conflicts:
	src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
	src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
	src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
	src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
	src/Tests/dotnet.Tests/CommandTests/ToolInstallLocalCommandTests.cs
@JL03-Yue JL03-Yue requested a review from dsplaisted April 11, 2023 19:09
@@ -77,71 +77,29 @@ public override int Execute()
(FilePath? manifestFileOptional, string warningMessage) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the only difference between this Execute method and the one for ToolInstallCommand is that this one may print a warning message. Can we add that to the ToolInstallCommand and then remove the duplication by having this one call that Execute method?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in #35088

@JL03-Yue JL03-Yue changed the base branch from main to release/8.0.1xx August 30, 2023 23:13
@JL03-Yue
Copy link
Member Author

JL03-Yue commented Sep 5, 2023

Reopened at #35088

@JL03-Yue JL03-Yue closed this Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants