Skip to content

Commit 9c140ac

Browse files
Fix crash if jobrun.Plan == nil on restarting (#217)
1 parent 8998c09 commit 9c140ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

actionsrunner/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (run *RunRunner) Run(runnerenv RunnerEnvironment, listenerctx, corectx cont
179179
jobrun := &JobRun{}
180180
if runnerenv.ReadJSON("jobrun.json", jobrun) == nil &&
181181
((jobrun.RegistrationURL == instance.RegistrationURL && jobrun.Name == instance.Agent.Name) ||
182-
(len(settings.Instances) == 1)) {
182+
(len(settings.Instances) == 1) && jobrun.Plan != nil && jobrun.RunServiceURL == "") {
183183
result := "Failed"
184184
finish := &protocol.JobEvent{
185185
Name: "JobCompleted",

0 commit comments

Comments
 (0)