Skip to content

Commit 7334f4e

Browse files
committed
Clear interactive progress ticker after completion.
1 parent 80bb36a commit 7334f4e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

internal/output/progress.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ func (d *Spinner) Stop(msg string) {
9292
d.stop <- struct{}{}
9393
close(d.stop)
9494

95+
if d.out.Config().Interactive {
96+
nMoved := d.moveCaretBack()
97+
if nMoved > len(msg) {
98+
msg += strings.Repeat(" ", nMoved-len(msg)-1)
99+
}
100+
}
101+
95102
if msg != "" {
96103
if !d.out.Config().Interactive {
97104
d.out.Fprint(d.out.Config().ErrWriter, " ")

0 commit comments

Comments
 (0)