Always enable color on Windows since tty check doesn't work well

This commit is contained in:
Mitchell Hashimoto 2014-07-17 09:50:58 -07:00
parent 24ecb1ae70
commit c3229aaef1
1 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package main
import ( import (
"os" "os"
"os/signal" "os/signal"
"runtime"
"code.google.com/p/go.crypto/ssh/terminal" "code.google.com/p/go.crypto/ssh/terminal"
"github.com/hashicorp/terraform/command" "github.com/hashicorp/terraform/command"
@ -28,7 +29,8 @@ func init() {
} }
meta := command.Meta{ meta := command.Meta{
Color: terminal.IsTerminal(int(os.Stdout.Fd())), Color: runtime.GOOS == "windows" ||
terminal.IsTerminal(int(os.Stdout.Fd())),
ContextOpts: &ContextOpts, ContextOpts: &ContextOpts,
Ui: Ui, Ui: Ui,
} }