Skip to content

Commit

Permalink
Merge pull request #106 from buildpacks/binding
Browse files Browse the repository at this point in the history
Use appropriate bindings path for detect
  • Loading branch information
sambhav authored Jan 6, 2022
2 parents 4a789fd + f869c1d commit c9ad73f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion buildpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import (
"testing"

"github.com/BurntSushi/toml"
"github.com/buildpacks/libcnb"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb"

. "github.com/onsi/gomega"
)

Expand Down
5 changes: 2 additions & 3 deletions detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ func Detect(detector Detector, options ...Option) {
logger.Debug(PlatformFormatter(ctx.Platform))
}

file = filepath.Join(ctx.Platform.Path, "bindings")
if ctx.Platform.Bindings, err = NewBindingsFromPath(file); err != nil {
config.exitHandler.Error(fmt.Errorf("unable to read platform bindings %s\n%w", file, err))
if ctx.Platform.Bindings, err = NewBindingsForBuild(ctx.Platform.Path); err != nil {
config.exitHandler.Error(fmt.Errorf("unable to read platform bindings %s\n%w", ctx.Platform.Path, err))
return
}
logger.Debugf("Platform Bindings: %+v", ctx.Platform.Bindings)
Expand Down
1 change: 1 addition & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build tools
// +build tools

package tools
Expand Down

0 comments on commit c9ad73f

Please sign in to comment.