From 3582037be6a689ae8d01ab41c6ae78e657b985a3 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Thu, 12 Jan 2023 18:58:36 +0100 Subject: [PATCH] Add nil check for retries.Info.Info (#166) --- bundle/run/job.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bundle/run/job.go b/bundle/run/job.go index f67cdcca1..d46520ef2 100644 --- a/bundle/run/job.go +++ b/bundle/run/job.go @@ -103,10 +103,16 @@ func (r *jobRunner) Run(ctx context.Context, opts *Options) error { // This function is called each time the function below polls the run status. update := func(info *retries.Info[jobs.Run]) { - state := info.Info.State + i := info.Info + if i == nil { + return + } + + state := i.State if state == nil { return } + // Log the job run URL as soon as it is available. if prevState == nil { log.Printf("%s Run available at %s", prefix, info.Info.RunPageUrl)