Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to avoid panicking in PosixParser if there's no /dev/tty.
When using go-prompt before /dev/ is populated, it will panic() from NewStandardInputParser() because /dev/ isn't populated yet. This will use stdin (fd 0) as a fallback if /dev/tty doesn't exist. Furthermore GetWinSize() will return the default console size if the IOCTL call fails. This can happen if the default stdin is not a terminal, but a pipe as fixed in commit 846777c and described in issue c-bata#88. (cherry picked from commit aba8e36)
- Loading branch information