From a1b09287081eed979c80f7f293a644023b651a71 Mon Sep 17 00:00:00 2001 From: Daniel Mikusa Date: Fri, 24 Sep 2021 09:06:20 -0400 Subject: [PATCH] Include BOM in test for emptiness 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 --- application.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.go b/application.go index 36faf73..ffa8aba 100644 --- a/application.go +++ b/application.go @@ -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.