Skip to content

Commit

Permalink
fix: close cpu profile
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored Apr 4, 2024
1 parent 59f7d94 commit bdfbb23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/mockery.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (r *RootApp) Run() error {
if err != nil {
return stackerr.NewStackErrf(err, "Failed to create profile file")
}

defer f.Close()

Check warning on line 319 in cmd/mockery.go

View check run for this annotation

Codecov / codecov/patch

cmd/mockery.go#L319

Added line #L319 was not covered by tests
if err := pprof.StartCPUProfile(f); err != nil {
return fmt.Errorf("failed to start CPU profile: %w", err)
}
Expand Down

0 comments on commit bdfbb23

Please sign in to comment.