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

ob_is_tty returns false for stdin even when stdin is a tty #514

Closed
hartmans opened this issue Mar 5, 2020 · 1 comment
Closed

ob_is_tty returns false for stdin even when stdin is a tty #514

hartmans opened this issue Mar 5, 2020 · 1 comment

Comments

@hartmans
Copy link
Contributor

hartmans commented Mar 5, 2020

ob_is_tty calls get_fileno and then does

if fileno:

The problem is that stdin has fileno 0, and 0 is falsy, so this is always false for stdin.
So, similar to what's going on in #414 , you will never be able to pass an unmodified stdin tty through to the subprocess.
Probably that should be

if fileno is None:
@amoffat
Copy link
Owner

amoffat commented Apr 24, 2020

I think you mean fileno is not None, but yes, excellent catch on this 👍 . 1e15190 will go out with the next release

@amoffat amoffat closed this as completed Apr 24, 2020
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

2 participants