diff --git a/core/swag.go b/core/swag.go index 4ba00a39..1e9d2ae3 100644 --- a/core/swag.go +++ b/core/swag.go @@ -30,7 +30,8 @@ var ( ) func init() { - NoColors := os.Getenv("TERM") == "dumb" || + NoColors = os.Getenv("TERM") == "dumb" || + os.Getenv("TERM") == "" || (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) if NoColors { BOLD = ""