Skip to content

Commit

Permalink
Merge pull request #415 from tonistiigi/window-size
Browse files Browse the repository at this point in the history
progressui: handle zero window size
  • Loading branch information
AkihiroSuda authored May 25, 2018
2 parents e2fc1a7 + 5727898 commit 8b131af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/progress/progressui/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (disp *display) print(d displayInfo, all bool) {
width := 80
height := 10
size, err := disp.c.Size()
if err == nil {
if err == nil && size.Width > 0 && size.Height > 0 {
width = int(size.Width)
height = int(size.Height)
}
Expand Down

0 comments on commit 8b131af

Please sign in to comment.