diff --git a/tomcat/build.go b/tomcat/build.go index 4203667..d6650ea 100644 --- a/tomcat/build.go +++ b/tomcat/build.go @@ -175,7 +175,7 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) { ) if b.SBOMScanner == nil { - b.SBOMScanner = sbom.NewSyftCLISBOMScanner(context.Layers, effect.NewExecutor(), b.Logger) + b.SBOMScanner = sbom.NewSyftCLISBOMScanner(context.Layers, effect.CommandExecutor{}, b.Logger) } if err := b.SBOMScanner.ScanLaunch(context.Application.Path, libcnb.SyftJSON, libcnb.CycloneDXJSON); err != nil { return libcnb.BuildResult{}, fmt.Errorf("unable to create Launch SBoM \n%w", err) diff --git a/tomcat/build_test.go b/tomcat/build_test.go index 2cb5811..1807aa9 100644 --- a/tomcat/build_test.go +++ b/tomcat/build_test.go @@ -50,6 +50,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) { sbomScanner = mocks.SBOMScanner{} sbomScanner.On("ScanLaunch", ctx.Application.Path, libcnb.SyftJSON, libcnb.CycloneDXJSON).Return(nil) + t.Setenv("BP_ARCH", "amd64") }) it.After(func() {