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
plumbum hides stderr of pipes #240
Comments
I'll try to look at these soon! Hoping it's an easy fix. Feel free to dig around a bit, would start in plumbum/commands. |
I've got a fix for this, will commit in a day or two. |
Hey, I don't see code for this in master. Did something prevent you from merging the change you had? |
Seems to work...
|
Should also be tested for, now, with py.test, using file descriptor capture: @skip_on_windows
def test_pipe_stderr(self, capfd):
from plumbum.cmd import cat, head
cat['/dev/urndom'] & FG(1)
assert 'urndom' in capfd.readouterr()[1]
assert '' == capfd.readouterr()[1]
(cat['/dev/urndom'] | head['-c', '10']) & FG(retcode=1)
assert 'urndom' in capfd.readouterr()[1] |
@henryiii: My attempt to work around this was to use |
Any plan to fix this bug ? |
I'd be happy with a PR :) I won't have time to work on it for at least a couple of weeks or more. |
It seems it's not just pipes. I'd expect the following to print errors to Python process's
It doesn't print anything though. |
@woky I looked up the docstring for
If instead capturing stderr is preferred, one can do:
|
I don't want to capture stderr. It should be printed to actual
you get stdout into |
One way to workaround this is to just add
|
I would expect to see the standard error output of cat printed to the stderr of the Python process. For instance, zsh shows this:
The text was updated successfully, but these errors were encountered: