Skip to content

Commit

Permalink
Don't use a colon when no command is set
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Feb 22, 2024
1 parent facba50 commit f195952
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,17 @@ func (s *step) echo(current, max int) {
prepared := []string{}
for i, x := range s.text {
if i == len(s.text)-1 {
colon := ":"
if s.command == nil {
// Do not set the expectation that there is more if no command
// provided.
colon = ""
}
prepared = append(
prepared,
color.White.Darken().Sprintf(
"# %s [%d/%d]:\n",
x, current, max,
"# %s [%d/%d]%s\n",
x, current, max, colon,
),
)
} else {
Expand Down

0 comments on commit f195952

Please sign in to comment.