Skip to content

Commit

Permalink
⚡ (progressbar): Use less bytes when logging with a progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Apr 20, 2023
1 parent 4da8582 commit 32dea95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/progressbar/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (l *BarSafeLogger) Write(p []byte) (int, error) {
return l.out.Write(p)
}

buf := bytes.NewBuffer([]byte("\x1b[1K\r"))
buf := bytes.NewBuffer([]byte("\r\x1B[K"))
buf.Write(p)
buf.WriteString(l.bar.String())
if b, err := l.out.Write(buf.Bytes()); err != nil {
Expand Down

0 comments on commit 32dea95

Please sign in to comment.