summaryrefslogtreecommitdiff
path: root/libpod/image/image.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r--libpod/image/image.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 3d8cf2651..2457a1c22 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -459,13 +459,19 @@ func normalizeTag(tag string) (string, error) {
return "", err
}
// If the input doesn't specify a registry, set the registry to localhost
+ var ref reference.Named
if !decomposedTag.hasRegistry {
- ref, err := decomposedTag.referenceWithRegistry(DefaultLocalRegistry)
+ ref, err = decomposedTag.referenceWithRegistry(DefaultLocalRegistry)
+ if err != nil {
+ return "", err
+ }
+ } else {
+ ref, err = decomposedTag.normalizedReference()
if err != nil {
return "", err
}
- tag = ref.String()
}
+ tag = ref.String()
// 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)