1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 14:23:11 +00:00

Add tty and half way broken state handling

This commit is contained in:
Darren Shepherd
2015-02-16 16:38:49 -07:00
parent 3ab1f76ef0
commit 925a847ccc
11 changed files with 96 additions and 70 deletions

View File

@@ -1,14 +1,7 @@
package util
import (
"github.com/kless/term"
log "github.com/Sirupsen/logrus"
)
import "github.com/kless/term"
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)
}