Skip to content

Conversation

@mkoura
Copy link
Collaborator

@mkoura mkoura commented Dec 19, 2025

Refactored run_command to stream stdout and stderr concurrently using threads, allowing for proper separation of output streams. Updated shell script logging to capture stderr while still displaying both outputs in real time. Improves error handling and log clarity for CLI operations.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors command execution to stream stdout and stderr separately, improving error handling and output clarity. The changes introduce concurrent streaming using threads in Python and update the shell script to capture stderr while maintaining real-time output display.

Key Changes

  • Introduced threading-based concurrent streaming of stdout and stderr in Python's run_command helper
  • Updated shell script to capture stderr separately while maintaining real-time output of both streams
  • Removed the merging of stderr into stdout for better stream separation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/cardonnay/helpers.py Added _stream helper function and refactored run_command to use separate threads for streaming stdout and stderr concurrently instead of merging them
src/cardonnay_scripts/scripts/common/common.sh Modified cardano_cli_log to capture stderr separately using process substitution while maintaining real-time display of both output streams

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Refactored `run_command` to stream stdout and stderr concurrently using
threads, allowing for proper separation of output streams.
Updated shell script logging to capture stderr while still displaying
both outputs in real time. Improves error handling and log clarity for
CLI operations.
@mkoura mkoura merged commit 35a5e66 into master Dec 19, 2025
1 check passed
@mkoura mkoura deleted the keep_stderr branch December 19, 2025 16:41
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