don't show ui color if we're not colorized

This commit is contained in:
Matthew Hooker 2017-02-09 17:41:42 -08:00
parent e04f87effe
commit 60955d8c2c
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 3 additions and 1 deletions

View File

@ -92,10 +92,12 @@ func (c BuildCommand) Run(args []string) int {
Color: colors[i%len(colors)],
Ui: ui,
}
if _, ok := c.Ui.(*packer.MachineReadableUi); !ok {
ui.Say(fmt.Sprintf("%s output will be in this color.", b))
}
}
buildUis[b] = ui
ui.Say(fmt.Sprintf("%s output will be in this color.", b))
}
// Add a newline between the color output and the actual output