Skip to content

Commit

Permalink
Fix regression in markup output
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Nov 18, 2024
1 parent 118461d commit 9ab1522
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Ultra/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,26 @@ await AnsiConsole.Status()

options.LogStepProgress = (text) =>
{
if (verbose && previousText != text)
if (verbose && previousText is not null && previousText != text)
{
AnsiConsole.MarkupLine($"{previousText} [green]\u2713[/]");
AnsiConsole.MarkupLine($"{Markup.Escape(previousText)} [green]\u2713[/]");
previousText = text;
}

statusCtx.Status($"{text}");
statusCtx.Status(Markup.Escape(text));
};
options.LogProgress = (text) =>
{
if (verbose && previousText != null && previousText != text)
{
AnsiConsole.MarkupLine($"{previousText} [green]\u2713[/]");
AnsiConsole.MarkupLine($"{Markup.Escape(previousText)} [green]\u2713[/]");
}

statusCtx.Status(text);
statusCtx.Status(Markup.Escape(text));
previousText = text;
};
options.WaitingFileToComplete = (file) => { statusCtx.Status($"Waiting for {file} to complete"); };
options.WaitingFileToCompleteTimeOut = (file) => { statusCtx.Status($"Timeout waiting for {file} to complete"); };
options.WaitingFileToComplete = (file) => { statusCtx.Status($"Waiting for {Markup.Escape(file)} to complete"); };
options.WaitingFileToCompleteTimeOut = (file) => { statusCtx.Status($"Timeout waiting for {Markup.Escape(file)} to complete"); };

// Add the pid passed as options
options.ProcessIds.AddRange(pidList);
Expand Down Expand Up @@ -175,23 +175,23 @@ await AnsiConsole.Status()

options.LogStepProgress = (text) =>
{
if (verbose && previousText != text)
if (verbose && previousText is not null && previousText != text)
{
AnsiConsole.MarkupLine($"{previousText} [green]\u2713[/]");
AnsiConsole.MarkupLine($"{Markup.Escape(previousText)} [green]\u2713[/]");
previousText = text;
}

statusCtx.Status($"{text}");
statusCtx.Status(Markup.Escape(text));
};

options.LogProgress = (text) =>
{
if (verbose && previousText != null && previousText != text)
{
AnsiConsole.MarkupLine($"{previousText} [green]\u2713[/]");
AnsiConsole.MarkupLine($"{Markup.Escape(previousText)} [green]\u2713[/]");
}

statusCtx.Status(text);
statusCtx.Status(Markup.Escape(text));
previousText = text;
};

Expand Down

0 comments on commit 9ab1522

Please sign in to comment.