Merge "Improve dumb terminal detection" am: a3ded95424

am: 6be3939c68

Change-Id: I81fabe43666bc09c537223abb2dc7ed6b46d5e5b
This commit is contained in:
Mikhail Naganov 2019-06-28 20:51:42 -07:00 committed by android-build-merger
commit e34e7eacd1

View file

@ -23,6 +23,9 @@ import (
)
func isSmartTerminal(w io.Writer) bool {
if term, ok := os.LookupEnv("TERM"); ok && term == "dumb" {
return false
}
if f, ok := w.(*os.File); ok {
var termios syscall.Termios
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, f.Fd(),