Merge pull request #415 from tonistiigi/window-size

progressui: handle zero window size
docker-18.09
Akihiro Suda 2018-05-26 06:59:52 +09:00 committed by GitHub
commit 8b131af00d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}