Commit 792ec603 authored by Andy Goldstein's avatar Andy Goldstein

Reexport term.IsTerminal

Reexport term.IsTerminal so downstream consumers (e.g. OpenShift) can use it.
parent 50172148
......@@ -60,17 +60,17 @@ type fd interface {
// IsTerminalIn returns true if t.In is a terminal. Does not check /dev/tty
// even if TryDev is set.
func (t TTY) IsTerminalIn() bool {
return isTerminal(t.In)
return IsTerminal(t.In)
}
// IsTerminalOut returns true if t.Out is a terminal. Does not check /dev/tty
// even if TryDev is set.
func (t TTY) IsTerminalOut() bool {
return isTerminal(t.Out)
return IsTerminal(t.Out)
}
// isTerminal returns whether the passed object is a terminal or not
func isTerminal(i interface{}) bool {
// IsTerminal returns whether the passed object is a terminal or not
func IsTerminal(i interface{}) bool {
file, ok := i.(fd)
return ok && term.IsTerminal(file.Fd())
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment