Commit c627d51f authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Disable log colors on Windows

parent f466aa7b
...@@ -3,6 +3,7 @@ package cmd ...@@ -3,6 +3,7 @@ package cmd
import ( import (
"io/ioutil" "io/ioutil"
"path/filepath" "path/filepath"
"runtime"
"strings" "strings"
"github.com/go-errors/errors" "github.com/go-errors/errors"
...@@ -39,6 +40,7 @@ func init() { ...@@ -39,6 +40,7 @@ func init() {
logger.Level = logrus.InfoLevel logger.Level = logrus.InfoLevel
logger.SetFormatter(&prefixed.TextFormatter{ logger.SetFormatter(&prefixed.TextFormatter{
FullTimestamp: true, FullTimestamp: true,
DisableColors: runtime.GOOS == "windows",
}) })
if err := setFlags(RootCommand); err != nil { if err := setFlags(RootCommand); err != nil {
die(errors.WrapPrefix(err, "Failed to attach flags to "+RootCommand.Name()+" command", 0)) die(errors.WrapPrefix(err, "Failed to attach flags to "+RootCommand.Name()+" command", 0))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment