Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use effect.NewExecutor use CommandExecutor instead #328

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) {
AdditionalHelpMessage: "If this is unexpected, please try setting `rootProject.name` in `settings.gradle` or add a project.toml file and exclude the `build/` directory. For details see https://buildpacks.io/docs/app-developer-guide/using-project-descriptor/.",
}

bomScanner := sbom.NewSyftCLISBOMScanner(context.Layers, effect.NewExecutor(), b.Logger)
bomScanner := sbom.NewSyftCLISBOMScanner(context.Layers, effect.CommandExecutor{}, b.Logger)
a, err := b.ApplicationFactory.NewApplication(
md,
args,
Expand Down
2 changes: 2 additions & 0 deletions gradle/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
ApplicationFactory: &FakeApplicationFactory{},
HomeDirectoryResolver: FakeHomeDirectoryResolver{path: homeDir},
}

t.Setenv("BP_ARCH", "amd64")
})

it.After(func() {
Expand Down
3 changes: 1 addition & 2 deletions gradle/distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package gradle_test

import (
"io/ioutil"
"os"
"path/filepath"
"testing"
Expand All @@ -40,7 +39,7 @@ func testDistribution(t *testing.T, context spec.G, it spec.S) {
it.Before(func() {
var err error

ctx.Layers.Path, err = ioutil.TempDir("", "distribution-layers")
ctx.Layers.Path, err = os.MkdirTemp("", "distribution-layers")
Expect(err).NotTo(HaveOccurred())
})

Expand Down
Loading