Skip to content

Commit

Permalink
Merge pull request #10462 from medyagh/err_spam_image
Browse files Browse the repository at this point in the history
UI: do not send image repo info to stderr
  • Loading branch information
medyagh authored Feb 17, 2021
2 parents 40ac52e + 50138e6 commit 21291cb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,19 +689,18 @@ func GenerateTemplateData(addon *Addon, cfg config.KubernetesConfig) interface{}
opts.Registries[name] = "" // Avoid nil access when rendering
}

// Send messages to stderr due to some tests rely on stdout
if override, ok := opts.CustomRegistries[name]; ok {
out.ErrT(style.Option, "Using image {{.registry}}{{.image}}", out.V{
out.Step(style.Option, "Using image {{.registry}}{{.image}}", out.V{
"registry": override,
"image": image,
})
} else if opts.ImageRepository != "" {
out.ErrT(style.Option, "Using image {{.registry}}{{.image}} (global image repository)", out.V{
out.Step(style.Option, "Using image {{.registry}}{{.image}} (global image repository)", out.V{
"registry": opts.ImageRepository,
"image": image,
})
} else {
out.ErrT(style.Option, "Using image {{.registry}}{{.image}}", out.V{
out.Step(style.Option, "Using image {{.registry}}{{.image}}", out.V{
"registry": opts.Registries[name],
"image": image,
})
Expand Down

0 comments on commit 21291cb

Please sign in to comment.