-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Allow specifying stdout
to Popen
#180
Conversation
The reason behind this change is that on a particular session, we need access to the output, even if the command failed, for CI reporting reasons. |
Can you show me an example of when you'd use this and why the existing mechanisms aren't giving you the output you expect? |
When running in CI you might want to save pylint output to file (to be later parsed). pylint does not support outputting to file hence the only solution I found was to monkey patch subprocess.Popen so that I inject my own stdout/stderr file before calling session.run |
What @mostealth said, that's our exact same scenario and why I created this PR. This solution in use on our repo can be seen here |
That seems like a great reason. I had a comment about covering some edge cases, but I'm happy to merge this once we get that sorted. :) |
Rebased and added two new tests based on the comments provided. |
Okay, I made Does this still look good to you, @s0undt3ch? Also, it should be technically possible to override stderr now. Do you mind adding a test for that? |
Added tests for custom |
Thank you, @s0undt3ch! |
Anytime! |
No description provided.