@cryptotaxi247 / kubo / commits / fcea632b3

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

License: MIT Signed-off-by: chenminjian <727180553@qq.com>

chenminjian committed Nov 6, 2018 at 15:23 UTC fcea632b3d5d93da257ccd282d93a70e269090db
1 file changed +8
core/commands/add.go
+8
@@ -327,6 +327,14 @@ You can now check what blocks have been created by:
327 return
328 }
329 }
330 +
331 + if progress && bar.Total == 0 && bar.Get() != 0 {
332 + bar.Total = bar.Get()
333 + bar.ShowPercent = true
334 + bar.ShowBar = true
335 + bar.ShowTimeLeft = true
336 + bar.Update()
337 + }
338 }
339
340 if e := res.Error(); e != nil {