Skip to content

Commit

Permalink
User warning when trying to update beta version (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinek authored Oct 27, 2022
1 parent e8c5037 commit 6a6b4d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ToolUi.Runner/Forms/ToolsDialogWindow.commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ private void Update()
string dotnetArguments = "tool update ";
if (selectedTool == null)
return;
if (selectedTool.Version.Any(c => !char.IsDigit(c) && c != '.'))
{
await new OkCancel("Pre-release version may fail to update if no release version is available. In that case, please remove the tool and install it again manually.")
{
Title = "Pre-release version detected"
}.ShowDialog(this);
}

if (selectedTool.Manifest == ToolRow.GlobalManifestKey)
dotnetArguments += "--global ";
dotnetArguments += selectedTool.Id;
Expand Down

0 comments on commit 6a6b4d2

Please sign in to comment.