Skip to content

Commit

Permalink
Include BOM in test for emptiness
Browse files Browse the repository at this point in the history
The `BuildTOML.isEmpty()` method is used in one place, build.go, to check if it should write out build.toml. In the present state, if Unmet is empty but you have BOM entries then the build.toml and BOM entries are never written out. This change will look at both BOM & Unmet to determine emptiness. Thus it will write build.toml if BOM or Unmet has values.

Signed-off-by: Daniel Mikusa <dmikusa@vmware.com>
  • Loading branch information
Daniel Mikusa committed Sep 24, 2021
1 parent d893d2a commit a1b0928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type BuildTOML struct {
}

func (b BuildTOML) isEmpty() bool {
return len(b.Unmet) == 0
return len(b.BOM) == 0 && len(b.Unmet) == 0
}

// BOMEntry contains a bill of materials entry.
Expand Down

0 comments on commit a1b0928

Please sign in to comment.