Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use boolean field instead of string Contains check
Store the succeeded value from SetFinalResult in _pipelineSucceeded field
and use !_pipelineSucceeded instead of checking if string contains "PIPELINE FAILED"

Co-authored-by: davidfowl <[email protected]>
  • Loading branch information
Copilot and davidfowl committed Nov 1, 2025
commit e8bed6c0cd5924575a2e1ba847bd2d88a9c780a9
4 changes: 3 additions & 1 deletion src/Aspire.Cli/Utils/ConsoleActivityLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void WriteSummary()
AnsiConsole.MarkupLine(_finalStatusHeader!);

// If pipeline failed, show help message about using --log-level debug
if (_finalStatusHeader.Contains("PIPELINE FAILED") && !string.IsNullOrEmpty(_commandName))
if (!_pipelineSucceeded && !string.IsNullOrEmpty(_commandName))
{
var helpMessage = _enableColor
? $"[dim]For more details, re-run with: aspire {_commandName} --log-level debug[/]"
Expand All @@ -269,13 +269,15 @@ public void WriteSummary()

private string? _finalStatusHeader;
private string? _commandName;
private bool _pipelineSucceeded;

/// <summary>
/// Sets the final deployment result lines to be displayed in the summary (e.g., DEPLOYMENT FAILED ...).
/// Optional usage so existing callers remain compatible.
/// </summary>
public void SetFinalResult(bool succeeded, string? commandName = null)
{
_pipelineSucceeded = succeeded;
_commandName = commandName;
// Always show only a single final header line with symbol; no per-step duplication.
if (succeeded)
Expand Down
Loading