MCPcopy Create free account
hub / github.com/docker/cli / maybePrintEnvAuthWarning

Function maybePrintEnvAuthWarning

cli/command/registry/warning.go:13–18  ·  view source on GitHub ↗

maybePrintEnvAuthWarning if the `DOCKER_AUTH_CONFIG` environment variable is set this function will output a warning to stdErr

(out command.Streams)

Source from the content-addressed store, hash-verified

11// maybePrintEnvAuthWarning if the `DOCKER_AUTH_CONFIG` environment variable is
12// set this function will output a warning to stdErr
13func maybePrintEnvAuthWarning(out command.Streams) {
14 if os.Getenv(configfile.DockerEnvConfigKey) != "" {
15 tui.NewOutput(out.Err()).
16 PrintWarning("%[1]s is set and takes precedence.\nUnset %[1]s to restore the CLI auth behaviour.\n", configfile.DockerEnvConfigKey)
17 }
18}

Callers 2

runLoginFunction · 0.85
runLogoutFunction · 0.85

Calls 2

PrintWarningMethod · 0.80
ErrMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…