Skip to content

Commit

Permalink
Fixed nil pointer error with state exec and async runtimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Jul 9, 2024
1 parent 7474d49 commit 3c5287a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/runners/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,16 @@ func (s *Exec) Run(params *Params, args ...string) (rerr error) {

s.out.Notice(locale.Tr("operating_message", projectNamespace, projectDir))

rt, err := rtrunbit.SolveAndUpdate(s.auth, s.out, s.analytics, proj, nil, trigger, s.svcModel, s.cfg, rtrunbit.OptMinimalUI)
rt, commit, err := rtrunbit.Solve(s.auth, s.out, s.analytics, proj, nil, trigger, s.svcModel, s.cfg, rtrunbit.OptMinimalUI)
if err != nil {
return locale.WrapError(err, "err_activate_runtime", "Could not initialize a runtime for this project.")
return errs.Wrap(err, "Could not initialize runtime")
}

if !s.cfg.GetBool(constants.AsyncRuntimeConfig) {
err = rtrunbit.UpdateByReference(rt, commit, s.auth, proj, s.out, s.cfg, rtrunbit.OptMinimalUI)
if err != nil {
return errs.Wrap(err, "Could not setup runtime")
}
}

venv := virtualenvironment.New(rt)
Expand Down

0 comments on commit 3c5287a

Please sign in to comment.