Skip to content

Commit

Permalink
Merge pull request opencontainers#462 from q384566678/checkerr-fix
Browse files Browse the repository at this point in the history
cmd: modify the err judgment
  • Loading branch information
Mrunal Patel authored Sep 9, 2017
2 parents e8d5794 + 0ad3376 commit d09d81a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ func NewValidatorFromPath(bundlePath string, hostSpecific bool, platform string)
}

// CheckAll checks all parts of runtime bundle
func (v *Validator) CheckAll() (errs error) {
func (v *Validator) CheckAll() error {
var errs *multierror.Error
errs = multierror.Append(errs, v.CheckPlatform())
errs = multierror.Append(errs, v.CheckRoot())
errs = multierror.Append(errs, v.CheckMandatoryFields())
Expand All @@ -110,7 +111,7 @@ func (v *Validator) CheckAll() (errs error) {
errs = multierror.Append(errs, v.CheckHooks())
errs = multierror.Append(errs, v.CheckLinux())

return
return errs.ErrorOrNil()
}

// CheckRoot checks status of v.spec.Root
Expand Down

0 comments on commit d09d81a

Please sign in to comment.