mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-02 14:46:31 +00:00
4df9c8d6a5
* github.com/russross/meddler v1.0.0 -> v1.0.1 * github.com/gin-gonic/gin v1.6.3 -> v1.7.4 * github.com/go-sql-driver/mysql v1.5.0 -> v1.6.0 * github.com/sirupsen/logrus v1.6.0 -> v1.8.1 * github.com/rs/zerolog v1.18.0 -> v1.25.0
19 lines
507 B
Go
19 lines
507 B
Go
//go:build (linux || aix || zos) && !appengine
|
|
// +build linux aix zos
|
|
// +build !appengine
|
|
|
|
package isatty
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
// IsTerminal return true if the file descriptor is terminal.
|
|
func IsTerminal(fd uintptr) bool {
|
|
_, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
|
|
return err == nil
|
|
}
|
|
|
|
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
|
|
// terminal. This is also always false on this environment.
|
|
func IsCygwinTerminal(fd uintptr) bool {
|
|
return false
|
|
}
|