]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
common/terminal: Enable color output on windows
authorJoe Mooring <joe.mooring@veriphor.com>
Sun, 8 Jun 2025 23:48:49 +0000 (16:48 -0700)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 9 Jun 2025 09:44:13 +0000 (11:44 +0200)
Closes #8209

common/terminal/colors.go

index 8aa0e1af2a8b99327020eb938a835cc78778a020..fef6efce882304fc833370ef25c3467044dbc83e 100644 (file)
@@ -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))
 }