From f19595262796cae0884289d6d299ce81386b446b Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Thu, 22 Feb 2024 10:22:36 +0100 Subject: [PATCH] Don't use a colon when no command is set Signed-off-by: Sascha Grunert --- run.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/run.go b/run.go index 86306ef..10cf257 100644 --- a/run.go +++ b/run.go @@ -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 {