Skip to content

Commit 76d350e

Browse files
thomhurstclaude
andcommitted
fix: configure SpectreLogger console width for CI environments
- Fix broken UseConsole syntax (was missing semicolon and using invalid lambda) - Configure console width to 160 when output is redirected (common in CI) - Pass configured AnsiConsole.Console to SpectreLogger Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 884f7eb commit 76d350e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/ModularPipelines/DependencyInjection/DependencyInjectionSetup.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using ModularPipelines.Options.Validators;
3232
using ModularPipelines.Engine.State;
3333
using ModularPipelines.Validation;
34+
using Spectre.Console;
3435
using Vertical.SpectreLogger;
3536
using Vertical.SpectreLogger.Options;
3637

@@ -78,6 +79,16 @@ private static void RegisterBundledServices(IServiceCollection services)
7879

7980
builder.AddSpectreConsole(config =>
8081
{
82+
// Configure console width for CI environments
83+
// When output is redirected (common in CI), Spectre defaults to 80 chars
84+
// We expand this to 160 for better readability in CI logs
85+
if (System.Console.IsOutputRedirected)
86+
{
87+
AnsiConsole.Console.Profile.Width = 160;
88+
}
89+
90+
config.UseConsole(AnsiConsole.Console);
91+
8192
// Configure output templates without timestamps
8293
// Command logging already includes precise timestamps ([HH:mm:ss.fff])
8394
// so we don't need them from the logger as well

0 commit comments

Comments
 (0)