Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Separate stderr from stdout in execute function #114

Open
rabbull opened this issue Feb 4, 2025 · 0 comments
Open

Feature Request: Separate stderr from stdout in execute function #114

rabbull opened this issue Feb 4, 2025 · 0 comments

Comments

@rabbull
Copy link
Contributor

rabbull commented Feb 4, 2025

Thanks for your work on this project! It's incredibly useful!

However, I noticed that the execute function merges the stderr output of the container into stdout.

output = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)

This makes it difficult to distinguish between standard output and error messages. This makes things partically tricky when working with structured outputs (say, JSON), where warnings that can be ignored are printed to standard error. Merged output can't be decoded and it's challenging to filter-out warning messages.

Would it be possible to modify the execute function, to return stdout and stderr separately, or provide an option to keep them distinct? This would greatly improve usability when handling container output.

@rabbull rabbull changed the title [Feature Request] Separate stderr from stdout in execute function Feature Request: Separate stderr from stdout in execute function Feb 4, 2025
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

No branches or pull requests

1 participant