diff --git a/log/text.go b/log/text.go index 5ee91d19..a3a731c9 100644 --- a/log/text.go +++ b/log/text.go @@ -26,6 +26,8 @@ import ( "github.com/mgutz/ansi" "github.com/Sirupsen/logrus" + + "golang.org/x/crypto/ssh/terminal" ) const clear = ansi.Reset @@ -36,7 +38,7 @@ var ( ) func init() { - isTerminal = logrus.IsTerminal(os.Stdout) + isTerminal = terminal.IsTerminal(int(os.Stdout.Fd())) isColoured = isTerminal && (runtime.GOOS != "windows") }