Skip to content

Commit

Permalink
build: add logger for auth
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <[email protected]>
  • Loading branch information
tonistiigi committed Dec 8, 2020
1 parent 69a1419 commit 6b6afc4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/session/upload/uploadprovider"
"github.com/moby/buildkit/util/entitlements"
"github.com/moby/buildkit/util/progress/progresswriter"
"github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
Expand Down Expand Up @@ -527,6 +528,15 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
defers = append(defers, release)
m[k][i].so = so
}
for _, at := range opt.Session {
if s, ok := at.(interface {
SetLogger(progresswriter.Logger)
}); ok {
s.SetLogger(func(s *client.SolveStatus) {
w.Write(s)
})
}
}
}

resp = map[string]*client.SolveResponse{}
Expand Down

0 comments on commit 6b6afc4

Please sign in to comment.