1
0
mirror of https://github.com/rancher/os.git synced 2025-07-05 02:56:13 +00:00
os/util/term.go
2015-02-14 09:35:12 -07:00

15 lines
288 B
Go

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)
}