diff --git a/pkg/cmd/pipelinerun/log_reader.go b/pkg/cmd/pipelinerun/log_reader.go index eb42e3db6..2f62021dc 100644 --- a/pkg/cmd/pipelinerun/log_reader.go +++ b/pkg/cmd/pipelinerun/log_reader.go @@ -95,8 +95,10 @@ func (lr *LogReader) readLiveLogs(pr *v1alpha1.PipelineRun) (<-chan Log, <-chan wg.Wait() - if pr.Status.Conditions[0].Status == corev1.ConditionFalse { - errC <- fmt.Errorf(pr.Status.Conditions[0].Message) + if pr.Status.Conditions != nil { + if pr.Status.Conditions[0].Status == corev1.ConditionFalse { + errC <- fmt.Errorf(pr.Status.Conditions[0].Message) + } } }() diff --git a/pkg/helper/taskrun/taskrun.go b/pkg/helper/taskrun/taskrun.go index 6bb2ffca8..85b5aa099 100644 --- a/pkg/helper/taskrun/taskrun.go +++ b/pkg/helper/taskrun/taskrun.go @@ -51,7 +51,10 @@ func IsFiltered(tr Run, allowed []string) bool { } func HasScheduled(trs *v1alpha1.PipelineRunTaskRunStatus) bool { - return trs.Status.PodName != "" + if trs.Status != nil { + return trs.Status.PodName != "" + } + return false } func Filter(trs []Run, ts []string) []Run {