Merge pull request #998 from AkihiroSuda/authprovider-stderr

authprovider: set stderr
docker-19.03
Tõnis Tiigi 2019-05-10 10:51:41 -07:00 committed by GitHub
commit e0e3ad6b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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),
}
}