Commit c7d7e2cf authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: don't change background color in UI

parent ef5448d4
## 0.4.1 (unreleased) ## 0.4.1 (unreleased)
BUG FIXES:
* core: Don't change background color on CLI anymore, making things look
a tad nicer in some terminals.
## 0.4.0 (November 19, 2013) ## 0.4.0 (November 19, 2013)
......
...@@ -106,7 +106,7 @@ func (u *ColoredUi) colorize(message string, color UiColor, bold bool) string { ...@@ -106,7 +106,7 @@ func (u *ColoredUi) colorize(message string, color UiColor, bold bool) string {
attr = 1 attr = 1
} }
return fmt.Sprintf("\033[%d;%d;40m%s\033[0m", attr, color, message) return fmt.Sprintf("\033[%d;%dm%s\033[0m", attr, color, message)
} }
func (u *ColoredUi) supportsColors() bool { func (u *ColoredUi) supportsColors() bool {
......
...@@ -19,19 +19,19 @@ func TestColoredUi(t *testing.T) { ...@@ -19,19 +19,19 @@ func TestColoredUi(t *testing.T) {
ui.Say("foo") ui.Say("foo")
result := readWriter(bufferUi) result := readWriter(bufferUi)
if result != "\033[1;33;40mfoo\033[0m\n" { if result != "\033[1;33mfoo\033[0m\n" {
t.Fatalf("invalid output: %s", result) t.Fatalf("invalid output: %s", result)
} }
ui.Message("foo") ui.Message("foo")
result = readWriter(bufferUi) result = readWriter(bufferUi)
if result != "\033[0;33;40mfoo\033[0m\n" { if result != "\033[0;33mfoo\033[0m\n" {
t.Fatalf("invalid output: %s", result) t.Fatalf("invalid output: %s", result)
} }
ui.Error("foo") ui.Error("foo")
result = readWriter(bufferUi) result = readWriter(bufferUi)
if result != "\033[1;31;40mfoo\033[0m\n" { if result != "\033[1;31mfoo\033[0m\n" {
t.Fatalf("invalid output: %s", result) t.Fatalf("invalid output: %s", result)
} }
} }
......
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