1
0
mirror of https://github.com/rancher/os.git synced 2025-06-19 03:31:55 +00:00
os/util/term.go

15 lines
288 B
Go
Raw Normal View History

package util
import (
"github.com/kless/term"
log "github.com/Sirupsen/logrus"
)
func IsRunningInTty() bool {
log.Infof("Is a tty : %v", term.IsTerminal(0))
log.Infof("Is a tty : %v", term.IsTerminal(1))
log.Infof("Is a tty : %v", term.IsTerminal(2))
return term.IsTerminal(1)
}