Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ public static async Task Main(string[] args)
private static void OnCancelKeyPress(object? sender, ConsoleCancelEventArgs e)
{
e.Cancel = true; // Prevent immediate termination

// Only process cancellation once to prevent repeated messages
if (_wasCancelled)
{
return;
}

_wasCancelled = true;
_cts?.Cancel();
AnsiConsole.MarkupLine("[yellow]Cancellation requested. Shutting down gracefully...[/]");
Expand Down