You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression in 6.2.0: device monitor rejects piped stdout even when stdin is a TTY #5551
loop:// avoids requiring a physical serial device. Only stdout is piped; stdin remains attached to the terminal. The same error occurs when piping a real device's output to jq.
Actual result
The monitor refuses to start:
UserSideException: `pio device monitor` requires an interactive terminal on stdin and cannot run with piped or redirected input. If you're scripting device I/O, talk to the serial port directly instead (e.g., with pyserial) rather than through `pio device monitor`.
Expected result
The monitor starts, reads keyboard input from the terminal, and writes its output to the pipe. It should still reject input that is not a TTY, as intended by #5503.
Additional information
In 6.2.0, new_terminal() calls is_terminal(), which checks sys.stdout.isatty(). That returns False for the pipe even though sys.stdin.isatty() is True. The guard was added in #5503 and is absent in 6.1.19.
Could the monitor check stdin specifically and add coverage for TTY stdin with piped stdout?
Activity