ui/termstatus: fix clearing status lines

To clear the status lines, they should be set to an empty array to
prevent future updates of those lines. Setting the status lines to an
array containing an empty string is wrong as this causes the output to
continuously add that empty status line after each message.
This commit is contained in:
Michael Eischer
2024-07-06 11:27:35 +02:00
parent 8e27a934de
commit aedead2823
5 changed files with 13 additions and 7 deletions

View File

@@ -53,7 +53,7 @@ func newGenericProgressMax(show bool, max uint64, description string, print func
func newTerminalProgressMax(show bool, max uint64, description string, term *termstatus.Terminal) *progress.Counter {
return newGenericProgressMax(show, max, description, func(status string, final bool) {
if final {
term.SetStatus([]string{})
term.SetStatus(nil)
term.Print(status)
} else {
term.SetStatus([]string{status})