Stop logging messages about using DOCKER_CONFIG

Since the GetDefaultAuthFile() is caused during podman init
it ends up logging the same info line multiple times, with
no way for the user to quiet the output.

Fixes https://github.com/containers/podman/issues/9473

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2021-02-22 17:00:03 -05:00
parent 3b17617e6d
commit a6447704e3
1 changed files with 1 additions and 3 deletions

View File

@ -22,9 +22,7 @@ import (
func GetDefaultAuthFile() string {
authfile := os.Getenv("REGISTRY_AUTH_FILE")
if authfile == "" {
if authfile, ok := os.LookupEnv("DOCKER_CONFIG"); ok {
logrus.Infof("Using DOCKER_CONFIG environment variable for authfile path %s", authfile)
}
authfile = os.Getenv("DOCKER_CONFIG")
}
return authfile
}