Skip to content

Commit

Permalink
Merge pull request #112 from buildpack/fix-detector-group-logging
Browse files Browse the repository at this point in the history
Fix detect to log 'Trying group X of Y...' [#105]
  • Loading branch information
djoyahoy authored Apr 8, 2019
2 parents 4134f79 + 3391786 commit 1218b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ type BuildpackGroup struct {
func (bg *BuildpackGroup) Detect(c *DetectConfig) (plan []byte, group *BuildpackGroup, ok bool) {
group = &BuildpackGroup{}
detected := true
c.Out.Printf("Trying group of %d...", len(bg.Buildpacks))
plan, codes := bg.pDetect(c)
c.Out.Printf("======== Results ========")
for i, code := range codes {
Expand Down Expand Up @@ -199,6 +198,7 @@ type BuildpackOrder []BuildpackGroup

func (bo BuildpackOrder) Detect(c *DetectConfig) (plan []byte, group *BuildpackGroup) {
for i := range bo {
c.Out.Printf("Trying group %d out of %d with %d buildpacks...", i+1, len(bo), len(bo[i].Buildpacks))
if p, g, ok := bo[i].Detect(c); ok {
return p, g
}
Expand Down

0 comments on commit 1218b42

Please sign in to comment.