Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
c7d7e2cf
Commit
c7d7e2cf
authored
Nov 19, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer: don't change background color in UI
parent
ef5448d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
CHANGELOG.md
CHANGELOG.md
+3
-0
packer/ui.go
packer/ui.go
+1
-1
packer/ui_test.go
packer/ui_test.go
+3
-3
No files found.
CHANGELOG.md
View file @
c7d7e2cf
## 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)
...
...
packer/ui.go
View file @
c7d7e2cf
...
@@ -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
(
"
\0
33[%d;%d
;40
m%s
\0
33[0m"
,
attr
,
color
,
message
)
return
fmt
.
Sprintf
(
"
\0
33[%d;%dm%s
\0
33[0m"
,
attr
,
color
,
message
)
}
}
func
(
u
*
ColoredUi
)
supportsColors
()
bool
{
func
(
u
*
ColoredUi
)
supportsColors
()
bool
{
...
...
packer/ui_test.go
View file @
c7d7e2cf
...
@@ -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
!=
"
\0
33[1;33
;40
mfoo
\0
33[0m
\n
"
{
if
result
!=
"
\0
33[1;33mfoo
\0
33[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
!=
"
\0
33[0;33
;40
mfoo
\0
33[0m
\n
"
{
if
result
!=
"
\0
33[0;33mfoo
\0
33[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
!=
"
\0
33[1;31
;40
mfoo
\0
33[0m
\n
"
{
if
result
!=
"
\0
33[1;31mfoo
\0
33[0m
\n
"
{
t
.
Fatalf
(
"invalid output: %s"
,
result
)
t
.
Fatalf
(
"invalid output: %s"
,
result
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment