Skip to content

Commit

Permalink
defer bar.Finish()
Browse files Browse the repository at this point in the history
  • Loading branch information
schomatis committed Feb 16, 2022
1 parent d04a122 commit 4cacaf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ only-hash, and progress/status related flags) will change the final hash.
bar.ShowPercent = false
bar.Output = os.Stderr
bar.Start()
defer bar.Finish()
}

lastFile := ""
Expand Down
1 change: 1 addition & 0 deletions core/commands/cat.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ var CatCmd = &cmds.Command{
var bar *pb.ProgressBar
bar, reader = progressBarForReader(os.Stderr, val, int64(res.Length()))
bar.Start()
defer bar.Finish()
}

err = re.Emit(reader)
Expand Down

0 comments on commit 4cacaf2

Please sign in to comment.