1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 03:19:47 +08:00

fix(cmd/add): progressbar output error when input is read from stdin

License: MIT
Signed-off-by: chenminjian <727180553@qq.com>
This commit is contained in:
chenminjian
2018-11-06 15:23:21 +08:00
committed by Steven Allen
parent e8d1a1f0c5
commit fcea632b3d

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 {