Add nil check for retries.Info.Info (#166)

This commit is contained in:
Pieter Noordhuis 2023-01-12 18:58:36 +01:00 committed by GitHub
parent e48eb6ff50
commit 3582037be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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)