woodpecker-email/vendor/github.com/Sirupsen/logrus/terminal_solaris.go
Michael de Wit f128c947ab Refactor plugin to be compatible with Drone 0.5 (#13)
* Refactor plugin to be compatible with Drone 0.5

* Add vendor files

* Re-add logo.svg, make loading environment from .env file optional, and use drone-go/template

* Fix README

* Fix issue with date formatting, update the DOCS, and improve types

* Add working directory and volume mount to README example
2017-01-16 13:20:59 +01:00

16 lines
273 B
Go

// +build solaris,!appengine
package logrus
import (
"os"
"golang.org/x/sys/unix"
)
// IsTerminal returns true if the given file descriptor is a terminal.
func IsTerminal() bool {
_, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA)
return err == nil
}