mirror of
https://github.com/containers/podman.git
synced 2025-06-25 03:52:15 +08:00
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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user