mirror of
https://github.com/go-task/task.git
synced 2026-04-26 20:02:40 +02:00
219bf3e5a5
Add //nolint:gosec annotations for intentional code patterns that are safe in context (path traversal in release tool, uintptr conversion for terminals, weak rand in tests, TLS skip verify for user-configured insecure mode). Assisted-by: Kimi-K2.5 via Crush <crush@charm.land>
12 lines
180 B
Go
12 lines
180 B
Go
package term
|
|
|
|
import (
|
|
"os"
|
|
|
|
"golang.org/x/term"
|
|
)
|
|
|
|
func IsTerminal() bool {
|
|
return term.IsTerminal(int(os.Stdin.Fd())) && term.IsTerminal(int(os.Stdout.Fd())) //nolint:gosec
|
|
}
|