Skip to content

Commit b2b6521

Browse files
fix(travis): nil pointer dereference
1 parent dc33248 commit b2b6521

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/condition/travis.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ func (ci *TravisCI) RunCondition(config CIConfig) error {
7979
if err != nil {
8080
return err
8181
}
82-
8382
successes := 0
8483
for _, job := range jobs {
85-
if *job.Id == uint(currentJobId) || *job.AllowFailure || *job.State == "passed" {
84+
if *job.Id == uint(currentJobId) || (job.AllowFailure != nil && *job.AllowFailure) || *job.State == "passed" {
8685
successes++
8786
continue
8887
}

0 commit comments

Comments
 (0)