aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-06-08 18:12:15 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-06-14 22:11:12 +0800
commit688fbab5d52d9c8bc6d73abdf83839aa7358c23e (patch)
tree496901a9a2503c4f46a8cdc380d788cea9f2b43c
parent71a89b7c751b96b98a91641090b06a51e1b95f72 (diff)
downloadgo-tangerine-688fbab5d52d9c8bc6d73abdf83839aa7358c23e.tar
go-tangerine-688fbab5d52d9c8bc6d73abdf83839aa7358c23e.tar.gz
go-tangerine-688fbab5d52d9c8bc6d73abdf83839aa7358c23e.tar.bz2
go-tangerine-688fbab5d52d9c8bc6d73abdf83839aa7358c23e.tar.lz
go-tangerine-688fbab5d52d9c8bc6d73abdf83839aa7358c23e.tar.xz
go-tangerine-688fbab5d52d9c8bc6d73abdf83839aa7358c23e.tar.zst
go-tangerine-688fbab5d52d9c8bc6d73abdf83839aa7358c23e.zip
[release/1.4.7] console: fix windows color transformation issue
(cherry picked from commit d251d48439bf85d0fb0b52dd931e5ec6aea8b412)
-rw-r--r--console/console.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/console/console.go b/console/console.go
index baa9cf545..ab0c1ea58 100644
--- a/console/console.go
+++ b/console/console.go
@@ -30,6 +30,7 @@ import (
"github.com/ethereum/go-ethereum/internal/jsre"
"github.com/ethereum/go-ethereum/internal/web3ext"
"github.com/ethereum/go-ethereum/rpc"
+ "github.com/mattn/go-colorable"
"github.com/peterh/liner"
"github.com/robertkrimen/otto"
)
@@ -80,7 +81,7 @@ func New(config Config) (*Console, error) {
config.Prompt = DefaultPrompt
}
if config.Printer == nil {
- config.Printer = os.Stdout
+ config.Printer = colorable.NewColorableStdout()
}
// Initialize the console and return
console := &Console{