Skip to content

Commit

Permalink
Properly handle errors for running bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Oct 18, 2024
1 parent 4a7e30f commit d373fc2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/run/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ var Cmd = &cobra.Command{

ready := make(chan struct{})
go func() {
err = bootstrap.Run(ctx, cfg, ready)
if err != nil {
panic(err)
if err = bootstrap.Run(ctx, cfg, ready); err != nil {
log.Err(err).Msg("Failed to run bootstrap")
cancel()
os.Exit(1)
}
}()

Expand Down

0 comments on commit d373fc2

Please sign in to comment.