Skip to content

Commit

Permalink
fix nil pointer if error encountered during initialisation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhadfield committed Apr 30, 2024
1 parent 44d95b7 commit 6c68672
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ func initialiseProviders(l *slog.Logger, runners map[string]providers.ProviderCl
_, runner := name, runner // https://golang.org/doc/faq#closures_and_goroutines

g.Go(func() error {
err = runner.Initialise()
if err != nil {
name := name
gErr := runner.Initialise()
if gErr != nil {
stopSpinnerIfActive(s)

l.Error("failed to initialise", "provider", name, "error", err.Error())
l.Error("failed to initialise", "provider", name, "error", gErr.Error())

if !hideProgress {
s.Start()
Expand Down

0 comments on commit 6c68672

Please sign in to comment.