Skip to content

Commit

Permalink
Merge pull request #3395 from ActiveState/mitchell/dx-2945
Browse files Browse the repository at this point in the history
Fixed nil pointer error with `state exec` and async runtimes.
  • Loading branch information
mitchell-as authored Jul 9, 2024
2 parents 7474d49 + 3c5287a commit 06648ce
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 06648ce

Please sign in to comment.