diff --git a/cmd/buildctl/build.go b/cmd/buildctl/build.go index 327b66f1..46830c8f 100644 --- a/cmd/buildctl/build.go +++ b/cmd/buildctl/build.go @@ -154,7 +154,7 @@ func buildAction(clicontext *cli.Context) error { logrus.Infof("tracing logs to %s", traceFile.Name()) } - attachable := []session.Attachable{authprovider.NewDockerAuthProvider()} + attachable := []session.Attachable{authprovider.NewDockerAuthProvider(os.Stderr)} if ssh := clicontext.StringSlice("ssh"); len(ssh) > 0 { configs, err := build.ParseSSH(ssh) diff --git a/session/auth/authprovider/authprovider.go b/session/auth/authprovider/authprovider.go index 7df33cca..a7eb6f22 100644 --- a/session/auth/authprovider/authprovider.go +++ b/session/auth/authprovider/authprovider.go @@ -2,7 +2,7 @@ package authprovider import ( "context" - "io/ioutil" + "io" "sync" "github.com/docker/cli/cli/config" @@ -12,9 +12,9 @@ import ( "google.golang.org/grpc" ) -func NewDockerAuthProvider() session.Attachable { +func NewDockerAuthProvider(stderr io.Writer) session.Attachable { return &authProvider{ - config: config.LoadDefaultConfigFile(ioutil.Discard), + config: config.LoadDefaultConfigFile(stderr), } }