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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user