Don't color output if stdout is not a tty

This commit is contained in:
Mitchell Hashimoto 2014-07-17 09:37:36 -07:00
parent 541d23eea0
commit 8dc842aa8e
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"os"
"os/signal"
"code.google.com/p/go.crypto/ssh/terminal"
"github.com/hashicorp/terraform/command"
"github.com/mitchellh/cli"
)
@ -27,6 +28,7 @@ func init() {
}
meta := command.Meta{
Color: terminal.IsTerminal(int(os.Stdout.Fd())),
ContextOpts: &ContextOpts,
Ui: Ui,
}