1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-23 17:22:09 +01:00
drone-cli/vendor/github.com/Sirupsen/logrus/terminal_check_notappengine.go
Brad Rydzewski f18b9fe2ac update dep
2018-02-14 13:06:05 -08:00

20 lines
252 B
Go

// +build !appengine
package logrus
import (
"io"
"os"
"golang.org/x/crypto/ssh/terminal"
)
func checkIfTerminal(w io.Writer) bool {
switch v := w.(type) {
case *os.File:
return terminal.IsTerminal(int(v.Fd()))
default:
return false
}
}