summaryrefslogtreecommitdiff
path: root/libpod/image
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2019-01-09 19:49:53 +0100
committerMiloslav Trmač <mitr@redhat.com>2019-01-14 04:07:23 +0100
commit035c732dedf37637b9ac5e37748ec1b0bea3c966 (patch)
tree3890503e6ea471d65c582f555cec213255e02e8e /libpod/image
parent788bc360219e83028b3b0996ab4b6afbd0530e9c (diff)
downloadpodman-035c732dedf37637b9ac5e37748ec1b0bea3c966.tar.gz
podman-035c732dedf37637b9ac5e37748ec1b0bea3c966.tar.bz2
podman-035c732dedf37637b9ac5e37748ec1b0bea3c966.zip
Reorganize normalizeTag
Move the registry defaulting before tag defaulting. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod/image')
-rw-r--r--libpod/image/image.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index b51aced49..249beceac 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -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
}