Merge pull request #5743 from chenminjian/fix/cmd/add

fix(cmd/add): progressbar output error when input is read from stdin
This commit is contained in:
Steven Allen 2018-11-07 07:56:56 -08:00 committed by GitHub
commit ee11bc790b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -327,6 +327,14 @@ You can now check what blocks have been created by:
return
}
}
if progress && bar.Total == 0 && bar.Get() != 0 {
bar.Total = bar.Get()
bar.ShowPercent = true
bar.ShowBar = true
bar.ShowTimeLeft = true
bar.Update()
}
}
if e := res.Error(); e != nil {