Skip to content

Commit

Permalink
Merge pull request #328 from paketo-buildpacks/fix-chars
Browse files Browse the repository at this point in the history
Do not use effect.NewExecutor use CommandExecutor instead
  • Loading branch information
anthonydahanne authored Oct 4, 2024
2 parents a392474 + 6b7d061 commit b4cfb5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
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

0 comments on commit b4cfb5d

Please sign in to comment.