fix: check if os.Stdin is a terminal before opening the TTY
Before adoption: this commit came in with the history the project adopted, so no landing records it.
This change checks if os.Stdin is a terminal before attempting to open the TTY for input. If os.Stdin is not a terminal, it will proceed to open the TTY as before.
authored by Ayman Bagabas · committed by GitHub · parent 110a919 · Browse files · 1 file+7 added−5 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Fixes: #1595
Diff stats
1 file+7 added−5 removed
- other:+7 added−5 removed