diff -r c040f992052f -r 1c52a0eeb952 vendor/github.com/mattn/go-isatty/isatty_bsd.go --- a/vendor/github.com/mattn/go-isatty/isatty_bsd.go Wed Sep 18 19:17:42 2019 +0200 +++ b/vendor/github.com/mattn/go-isatty/isatty_bsd.go Sun Feb 16 18:54:01 2020 +0100 @@ -3,16 +3,16 @@ package isatty -import ( - "syscall" - "unsafe" -) - -const ioctlReadTermios = syscall.TIOCGETA +import "golang.org/x/sys/unix" // IsTerminal return true if the file descriptor is terminal. func IsTerminal(fd uintptr) bool { - var termios syscall.Termios - _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) - return err == 0 + _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) + return err == nil } + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +}