Skip to content

Commit

Permalink
Use appropriate bindings path for detect
Browse files Browse the repository at this point in the history
Signed-off-by: Sambhav Kothari <[email protected]>
  • Loading branch information
sambhav committed Jan 5, 2022
1 parent 4a789fd commit f869c1d
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 f869c1d

Please sign in to comment.