mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
Reorganize normalizeTag
Move the registry defaulting before tag defaulting. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@ -458,14 +458,14 @@ func normalizeTag(tag string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
// If the input does not have a tag, we need to add one (latest)
|
||||
if !decomposedTag.isTagged {
|
||||
tag = fmt.Sprintf("%s:%s", tag, decomposedTag.tag)
|
||||
}
|
||||
// If the input doesn't specify a registry, set the registry to localhost
|
||||
if !decomposedTag.hasRegistry {
|
||||
tag = fmt.Sprintf("%s/%s", DefaultLocalRegistry, tag)
|
||||
}
|
||||
// If the input does not have a tag, we need to add one (latest)
|
||||
if !decomposedTag.isTagged {
|
||||
tag = fmt.Sprintf("%s:%s", tag, decomposedTag.tag)
|
||||
}
|
||||
return tag, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user