Skip to content

Commit b4aa32a

Browse files
authored
Merge pull request #2332 from ActiveState/mitchell/dx-1535
Clear interactive progress ticker after completion.
2 parents 80bb36a + 9f5b428 commit b4aa32a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

internal/output/progress.go

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

95+
// We're done, so remove the last spinner frame
96+
if d.out.Config().Interactive {
97+
nMoved := d.moveCaretBack()
98+
if nMoved > len(msg) {
99+
msg += strings.Repeat(" ", nMoved-len(msg)-1)
100+
}
101+
}
102+
95103
if msg != "" {
96104
if !d.out.Config().Interactive {
97105
d.out.Fprint(d.out.Config().ErrWriter, " ")

0 commit comments

Comments
 (0)