summaryrefslogtreecommitdiff
path: root/pkg/bindings/images/build.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2021-09-11 23:05:22 +0200
committerMiloslav Trmač <mitr@redhat.com>2021-12-10 18:16:23 +0100
commitd073b1275d30b6e7d7b67f71204093dbb283b2de (patch)
tree2aff83dc99ccc57d37de6fe78716595a11cfb3d5 /pkg/bindings/images/build.go
parent8155fb5658a3a282550b39b2c3a6cd80bc9653d1 (diff)
downloadpodman-d073b1275d30b6e7d7b67f71204093dbb283b2de.tar.gz
podman-d073b1275d30b6e7d7b67f71204093dbb283b2de.tar.bz2
podman-d073b1275d30b6e7d7b67f71204093dbb283b2de.zip
Call MakeXRegistryConfigHeader instead of Header(..., XRegistryConfigHeader)
All callers hard-code a header value, so this is actually shorter. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'pkg/bindings/images/build.go')
-rw-r--r--pkg/bindings/images/build.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index be6e5ab55..0f73604e1 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -294,12 +294,12 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
err error
)
if options.SystemContext == nil {
- headers, err = auth.Header(options.SystemContext, auth.XRegistryConfigHeader, "", "", "")
+ headers, err = auth.MakeXRegistryConfigHeader(options.SystemContext, "", "", "")
} else {
if options.SystemContext.DockerAuthConfig != nil {
headers, err = auth.Header(options.SystemContext, auth.XRegistryAuthHeader, options.SystemContext.AuthFilePath, options.SystemContext.DockerAuthConfig.Username, options.SystemContext.DockerAuthConfig.Password)
} else {
- headers, err = auth.Header(options.SystemContext, auth.XRegistryConfigHeader, options.SystemContext.AuthFilePath, "", "")
+ headers, err = auth.MakeXRegistryConfigHeader(options.SystemContext, options.SystemContext.AuthFilePath, "", "")
}
}
if err != nil {