mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-15 04:13:42 +00:00
1 parent
f98caa2656
commit
320e9b6057
1274 files changed
+398630
-9
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
// +build !appengine,!js,!windows,!aix
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user