Skip to content

Commit

Permalink
Merge pull request #5743 from chenminjian/fix/cmd/add
Browse files Browse the repository at this point in the history
fix(cmd/add): progressbar output error when input is read from stdin
  • Loading branch information
Stebalien authored Nov 7, 2018
2 parents e8d1a1f + fcea632 commit ee11bc7
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 ee11bc7

Please sign in to comment.