Commit d251d484 authored by Péter Szilágyi's avatar Péter Szilágyi

console: fix windows color transformation issue

parent fdd61b83
...@@ -30,6 +30,7 @@ import ( ...@@ -30,6 +30,7 @@ import (
"github.com/ethereum/go-ethereum/internal/jsre" "github.com/ethereum/go-ethereum/internal/jsre"
"github.com/ethereum/go-ethereum/internal/web3ext" "github.com/ethereum/go-ethereum/internal/web3ext"
"github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/rpc"
"github.com/mattn/go-colorable"
"github.com/peterh/liner" "github.com/peterh/liner"
"github.com/robertkrimen/otto" "github.com/robertkrimen/otto"
) )
...@@ -80,7 +81,7 @@ func New(config Config) (*Console, error) { ...@@ -80,7 +81,7 @@ func New(config Config) (*Console, error) {
config.Prompt = DefaultPrompt config.Prompt = DefaultPrompt
} }
if config.Printer == nil { if config.Printer == nil {
config.Printer = os.Stdout config.Printer = colorable.NewColorableStdout()
} }
// Initialize the console and return // Initialize the console and return
console := &Console{ console := &Console{
......
Markdown is supported
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