Skip to content

Logging: command echo is written after its own output - command blocks read bottom-up #3550

Description

@thomhurst

Category: logging UX — Breaking: no

Logging/CommandLogger.cs streams output lines during execution but writes the workingdir> command header only at completion (it needs exitCode/runTime), so every command block reads bottom-up. Example (run 30526435350, NugetVersionGeneratorModule): "Tool 'gitversion.tool' ... installed." at 08:34:18.0043 precedes its own command line ...> dotnet tool install ... at 08:34:18.0046; BuildSolutionsModule shows build output ending "Time Elapsed 00:00:05.11" above the dotnet build ModularPipelines.Analyzers.sln echo. Reproduced across runs.

Fix: log the command header when the command starts and emit a short completion line (✓ [1ms, exit 0] — the suffix already used for inline-output commands) at the end.

Part of #3239 (round 2 addendum).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: improvements and polish - after P1bugSomething isn't workingin-progressPicked up by an agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions