1
1
mirror of https://github.com/walles/moar.git synced 2024-11-29 17:23:37 +03:00

Warn about getting piped data on Windows

This commit is contained in:
Johan Walles 2021-04-18 07:36:13 +02:00
parent 1e46089cff
commit 4e8c49ea8d

View File

@ -18,6 +18,10 @@ func (screen *UnixScreen) setupSigwinchNotification() {
}
func (screen *UnixScreen) setupTtyInTtyOut() {
if !term.IsTerminal(int(os.Stdin.Fd())) {
panic("Getting piped data on stdin is not supported on Windows, fixes needed in screen-setup-windows.go.")
}
// This won't work if we're getting data piped to us, contributions welcome.
screen.ttyIn = os.Stdin