1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-05 00:59:19 +02:00
Files
lazygit/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go
Stefan Haller 4cf49ff449 Bump go-git
2025-04-09 11:23:55 +02:00

14 lines
259 B
Go

// +build darwin dragonfly freebsd netbsd openbsd
// +build !js
package logrus
import "golang.org/x/sys/unix"
const ioctlReadTermios = unix.TIOCGETA
func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}