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

Start initial support of running in Docker

This commit is contained in:
Darren Shepherd
2015-02-14 09:35:12 -07:00
parent d564e5ae7d
commit c997143d22
3 changed files with 94 additions and 16 deletions

14
util/term.go Normal file
View File

@@ -0,0 +1,14 @@
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)
}