Skip to content

Commit

Permalink
Show update command when there is an update
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Aug 21, 2024
1 parent cf3bc77 commit ef0f671
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/AbpDevTools/Commands/UpdateCheckCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async ValueTask ExecuteAsync(IConsole console)
}

var result = await updateChecker.CheckAsync(force: Force);

if (Force)
{
console.Output.WriteLine($"Current version: {result.CurrentVersion}");
Expand All @@ -50,12 +50,10 @@ public async ValueTask ExecuteAsync(IConsole console)
await notificationManager.SendAsync(
"AbpDevTools Update available!",
$"Run '{command}' to update. A newer version {result.LatestVersion} available for AbpDevTools");

AnsiConsole.Markup($"[yellow]A newer version {result.LatestVersion} available.[/]\n");

if (!Silent)
{
AnsiConsole.Markup($"Run '[black on yellow]{command}[/]' to update.");
}
AnsiConsole.Markup($"Run '[black on yellow]{command}[/]' to update.");
}
else
{
Expand Down

0 comments on commit ef0f671

Please sign in to comment.