Skip to content

Commit

Permalink
Make sure to stop progressbar on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Jun 9, 2015
1 parent feba3e1 commit c098cff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/commands/cat.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ it contains.
bar := pb.New(int(res.Length())).SetUnits(pb.U_BYTES)
bar.Output = res.Stderr()
bar.Start()
defer bar.Finish()

reader := bar.NewProxyReader(res.Output().(io.Reader))
res.SetOutput(reader)
Expand Down

0 comments on commit c098cff

Please sign in to comment.