mirror of https://github.com/containers/podman.git
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>
This commit is contained in:
parent
8155fb5658
commit
d073b1275d
|
|
@ -294,12 +294,12 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if options.SystemContext == nil {
|
if options.SystemContext == nil {
|
||||||
headers, err = auth.Header(options.SystemContext, auth.XRegistryConfigHeader, "", "", "")
|
headers, err = auth.MakeXRegistryConfigHeader(options.SystemContext, "", "", "")
|
||||||
} else {
|
} else {
|
||||||
if options.SystemContext.DockerAuthConfig != nil {
|
if options.SystemContext.DockerAuthConfig != nil {
|
||||||
headers, err = auth.Header(options.SystemContext, auth.XRegistryAuthHeader, options.SystemContext.AuthFilePath, options.SystemContext.DockerAuthConfig.Username, options.SystemContext.DockerAuthConfig.Password)
|
headers, err = auth.Header(options.SystemContext, auth.XRegistryAuthHeader, options.SystemContext.AuthFilePath, options.SystemContext.DockerAuthConfig.Username, options.SystemContext.DockerAuthConfig.Password)
|
||||||
} else {
|
} else {
|
||||||
headers, err = auth.Header(options.SystemContext, auth.XRegistryConfigHeader, options.SystemContext.AuthFilePath, "", "")
|
headers, err = auth.MakeXRegistryConfigHeader(options.SystemContext, options.SystemContext.AuthFilePath, "", "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue