Skip to content

Commit

Permalink
apply PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Rodriguez committed May 22, 2024
1 parent 72996ef commit b9fc080
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/pkg/packager/creator/testdata/invalid/zarf.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
kind: ZarfPackageConfig
metadata:
name: minimal-invalid
# must have at least 1 component
description: Minimal invalid package
description: Must have at least 1 component
2 changes: 1 addition & 1 deletion src/types/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (pkg ZarfPackage) Validate() error {
return fmt.Errorf(lang.PkgValidateErrPkgName, pkg.Metadata.Name)
}

if pkg.Components == nil {
if len(pkg.Components) == 0 {
return errors.New("package must have at least 1 component")
}

Expand Down

0 comments on commit b9fc080

Please sign in to comment.