diff --git a/Program.cs b/Program.cs index 0a7af50..bb017eb 100644 --- a/Program.cs +++ b/Program.cs @@ -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...[/]");