Skip to content

Commit

Permalink
Merge pull request #461 from ZackJagger/fix/nil-previews
Browse files Browse the repository at this point in the history
fix: add preview nil check on get --current --wait
  • Loading branch information
jenkins-x-bot authored Oct 6, 2023
2 parents 7e43a99 + d5623d1 commit b2cd697
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (o *Options) waitForCommit() (*v1alpha1.Preview, error) {
if err != nil {
return nil, err
}
if preview.Spec.PullRequest.LatestCommit == o.LatestCommit {
if preview != nil && preview.Spec.PullRequest.LatestCommit == o.LatestCommit {
return preview, nil
}

Expand Down

0 comments on commit b2cd697

Please sign in to comment.