Skip to content

Commit

Permalink
fix(cmd/add): progressbar output error when input is read from stdin
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: chenminjian <727180553@qq.com>
  • Loading branch information
qiwaa authored and Stebalien committed Nov 7, 2018
1 parent e8d1a1f commit fcea632
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fcea632

Please sign in to comment.