Skip to content

Commit

Permalink
Merging requires more than 1 file
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshnoronha committed Jul 10, 2024
1 parent 40b0bfa commit 5e009cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/assemble.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Advanced Example:
if err != nil {
return err
}


assembleParams.Ctx = &ctx
return assemble.Assemble(assembleParams)
},
Expand Down
4 changes: 4 additions & 0 deletions pkg/assemble/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ func (c *config) validate() error {
return fmt.Errorf("input files are not set")
}

if len(c.input.files) <= 1 {
return fmt.Errorf("assembly requires more than one sbom file")
}

err := c.validateInputContent()
if err != nil {
return err
Expand Down

0 comments on commit 5e009cf

Please sign in to comment.