Navigation Menu

Skip to content

Commit

Permalink
Fixed progress bar race conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Sep 14, 2018
1 parent 152055c commit 6a4a510
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions common/formatter/text.go
Expand Up @@ -57,13 +57,7 @@ func (tp *TextFormatter) DownloadProgressBar(resp *grab.Response, prefix string)
case <-t.C:
bar.Set(int(resp.BytesComplete()))
case <-resp.Done:
bar.ShowCounters = false
bar.ShowPercent = false
bar.ShowFinalTime = false
bar.ShowBar = false
bar.Prefix(prefix + " downloaded")
bar.Set(int(resp.BytesComplete()))
bar.Finish()
bar.FinishPrintOver(prefix + " downloaded")
return
}
}
Expand Down
4 changes: 2 additions & 2 deletions vendor/gopkg.in/cheggaaa/pb.v1/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/gopkg.in/cheggaaa/pb.v1/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion vendor/gopkg.in/cheggaaa/pb.v1/format.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 16 additions & 15 deletions vendor/gopkg.in/cheggaaa/pb.v1/pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/gopkg.in/cheggaaa/pb.v1/pb_win.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6a4a510

Please sign in to comment.