From: Joe Mooring Date: Sun, 8 Jun 2025 23:48:49 +0000 (-0700) Subject: common/terminal: Enable color output on windows X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4217fee4b0455dac0c711708afb27c6506fa3339;p=brevno-suite%2Fhugo common/terminal: Enable color output on windows Closes #8209 --- diff --git a/common/terminal/colors.go b/common/terminal/colors.go index 8aa0e1af2..fef6efce8 100644 --- a/common/terminal/colors.go +++ b/common/terminal/colors.go @@ -17,7 +17,6 @@ package terminal import ( "fmt" "os" - "runtime" "strings" isatty "github.com/mattn/go-isatty" @@ -41,10 +40,6 @@ func PrintANSIColors(f *os.File) bool { // IsTerminal return true if the file descriptor is terminal and the TERM // environment variable isn't a dumb one. func IsTerminal(f *os.File) bool { - if runtime.GOOS == "windows" { - return false - } - fd := f.Fd() return os.Getenv("TERM") != "dumb" && (isatty.IsTerminal(fd) || isatty.IsCygwinTerminal(fd)) }