aboutsummaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorHackyMiner <hackyminer@gmail.com>2018-09-29 22:15:39 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-09-29 22:15:39 +0800
commit44eb69561a32c1b1e5345b5872e7de69fff936c2 (patch)
tree0eefc0ded63fbf5c481b6ea845b6fdadf5a123b9 /internal
parentd9e324a331788959bb7fb7f388383b1cad4ca65b (diff)
downloadgo-tangerine-44eb69561a32c1b1e5345b5872e7de69fff936c2.tar
go-tangerine-44eb69561a32c1b1e5345b5872e7de69fff936c2.tar.gz
go-tangerine-44eb69561a32c1b1e5345b5872e7de69fff936c2.tar.bz2
go-tangerine-44eb69561a32c1b1e5345b5872e7de69fff936c2.tar.lz
go-tangerine-44eb69561a32c1b1e5345b5872e7de69fff936c2.tar.xz
go-tangerine-44eb69561a32c1b1e5345b5872e7de69fff936c2.tar.zst
go-tangerine-44eb69561a32c1b1e5345b5872e7de69fff936c2.zip
internal/debug: support color terminal for cygwin/msys2 (#17740)
- update go-colorable, go-isatty, go-runewidth packages - use go-isatty instead of log/term and remove log/term package
Diffstat (limited to 'internal')
-rw-r--r--internal/debug/flags.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/debug/flags.go b/internal/debug/flags.go
index 7d7eba98a..46c8fe9f8 100644
--- a/internal/debug/flags.go
+++ b/internal/debug/flags.go
@@ -25,11 +25,11 @@ import (
"runtime"
"github.com/ethereum/go-ethereum/log"
- "github.com/ethereum/go-ethereum/log/term"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/metrics/exp"
"github.com/fjl/memsize/memsizeui"
colorable "github.com/mattn/go-colorable"
+ "github.com/mattn/go-isatty"
"gopkg.in/urfave/cli.v1"
)
@@ -101,7 +101,7 @@ var (
)
func init() {
- usecolor := term.IsTty(os.Stderr.Fd()) && os.Getenv("TERM") != "dumb"
+ usecolor := (isatty.IsTerminal(os.Stderr.Fd()) || isatty.IsCygwinTerminal(os.Stderr.Fd())) && os.Getenv("TERM") != "dumb"
output := io.Writer(os.Stderr)
if usecolor {
output = colorable.NewColorableStderr()