Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69e10fbc authored by Mikhail Naganov's avatar Mikhail Naganov Committed by android-build-merger
Browse files

Perform TERM check for file writers only

am: 9d42425f

Change-Id: I2b1a4d5786c66c99dab541d9556f8b4a07e64fdd
parents 3916153c 9d42425f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -23,10 +23,10 @@ import (
)

func isSmartTerminal(w io.Writer) bool {
	if f, ok := w.(*os.File); ok {
		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(),
			ioctlGetTermios, uintptr(unsafe.Pointer(&termios)),