msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

[WIP] Terminal Logger is enabled in GitHub Copilot workstreams

Open Copilot opened this issue 4 months ago • 1 comments

Working on fixing Terminal Logger being enabled in GitHub Copilot workstreams.

Plan:

  • [x] Explore repository structure and understand current terminal logger detection logic
  • [x] Run existing tests to ensure current state is working
  • [x] Analyze the problem: Terminal logger shows ANSI escape sequences in automated environments like GitHub Copilot
  • [ ] Add detection for automated/CI environments (GitHub Actions, Copilot, etc.)
  • [ ] Modify CheckIfTerminalIsSupportedAndTryEnableAnsiColorCodes() to disable terminal logger in automated environments
  • [ ] Add tests to verify the new behavior
  • [ ] Run tests to ensure no regressions
  • [ ] Verify the fix works as expected

Key findings:

  • Terminal logger detection logic is in src/MSBuild/XMake.cs in ProcessTerminalLoggerConfiguration method
  • Current logic checks for ANSI support and screen output but doesn't detect automated environments
  • Need to add environment variable detection for GITHUB_ACTIONS, CI, and similar automation indicators

Fixes #12018.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot avatar Jun 17 '25 14:06 Copilot