1
1
mirror of https://github.com/walles/moar.git synced 2024-11-26 04:21:11 +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() { 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. // This won't work if we're getting data piped to us, contributions welcome.
screen.ttyIn = os.Stdin screen.ttyIn = os.Stdin