Skip to content

Commit

Permalink
fix: wrap defer to capture buildErr
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Goller <[email protected]>
  • Loading branch information
goller committed Aug 1, 2024
1 parent f339f5c commit c9da10b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func main() {

// Set the buildErr to any error that represents the build failing.
var buildErr error
defer build.Finish(buildErr)
defer func() { build.Finish(buildErr) }()

ctx, cancel := context.WithCancel(ctx)
printer, buildErr := progress.NewPrinter(ctx, os.Stderr, os.Stderr, "quiet")
Expand Down

0 comments on commit c9da10b

Please sign in to comment.