Skip to content

Commit

Permalink
Merge pull request #362 from wzshiming/automated-cherry-pick-of-#360-…
Browse files Browse the repository at this point in the history
…upstream-release-0.1

Automated cherry pick of #360: check error
  • Loading branch information
k8s-ci-robot authored Mar 8, 2023
2 parents 8d6e688 + 762678c commit 3f11a3c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/kwok/controllers/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ func NewStagesFromYaml(data []byte) ([]*internalversion.Stage, error) {
for {
var stage v1alpha1.Stage
err := decoder.Decode(&stage)
if errors.Is(err, io.EOF) {
break
if err != nil {
if errors.Is(err, io.EOF) {
break
}
return nil, err
}

internalStage, err := internalversion.ConvertToInternalVersionStage(&stage)
if err != nil {
return nil, err
Expand Down

0 comments on commit 3f11a3c

Please sign in to comment.