Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

PR #12704 routed version command output to stderr (diagnostic output convention), breaking TestMainFunctionExecutionPath/main_function_basic_execution_flow which used cmd.Output() to capture only stdout.

Changes

  • Changed test to use cmd.CombinedOutput() to capture both stdout and stderr
// Before: Only captured stdout
output, err := cmd.Output()

// After: Captures both streams
output, err := cmd.CombinedOutput()

This aligns with the pattern used in other integration tests (e.g., pkg/cli/completion_integration_test.go) for commands that may output to either stream.

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21510963380/job/62001738622#step:6:1


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

The version command was changed to output to stderr instead of stdout
in PR #12704, but the test was still using cmd.Output() which only
captures stdout. Changed to cmd.CombinedOutput() to capture both
stdout and stderr, fixing the test failure.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue in action step execution Fix test capturing stdout when version output moved to stderr Jan 30, 2026
Copilot AI requested a review from pelikhan January 30, 2026 14:16
@pelikhan pelikhan marked this pull request as ready for review January 30, 2026 14:21
@pelikhan pelikhan merged commit 5827eac into copilot/standardize-output-routing Jan 30, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/fix-action-step-issue branch January 30, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants