summaryrefslogtreecommitdiff
path: root/libpod/image
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/image')
-rw-r--r--libpod/image/pull.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/libpod/image/pull.go b/libpod/image/pull.go
index 82fe0fdd6..d09ddd599 100644
--- a/libpod/image/pull.go
+++ b/libpod/image/pull.go
@@ -286,11 +286,11 @@ func (ir *Runtime) pullGoalFromPossiblyUnqualifiedName(inputName string) (*pullG
if decomposedImage.hasRegistry {
var imageName, destName string
if hasShaInInputName(inputName) {
- imageName = fmt.Sprintf("%s%s", decomposedImage.transport, inputName)
+ imageName = inputName
} else {
- imageName = fmt.Sprintf("%s%s", decomposedImage.transport, decomposedImage.assemble())
+ imageName = decomposedImage.assemble()
}
- srcRef, err := alltransports.ParseImageName(imageName)
+ srcRef, err := alltransports.ParseImageName(fmt.Sprintf("%s%s", decomposedImage.transport, imageName))
if err != nil {
return nil, errors.Wrapf(err, "unable to parse '%s'", inputName)
}
@@ -318,11 +318,11 @@ func (ir *Runtime) pullGoalFromPossiblyUnqualifiedName(inputName string) (*pullG
var refPairs []pullRefPair
for _, registry := range searchRegistries {
decomposedImage.registry = registry
- imageName := fmt.Sprintf("%s%s", decomposedImage.transport, decomposedImage.assemble())
+ imageName := decomposedImage.assemble()
if hasShaInInputName(inputName) {
- imageName = fmt.Sprintf("%s%s/%s", decomposedImage.transport, registry, inputName)
+ imageName = fmt.Sprintf("%s/%s", registry, inputName)
}
- srcRef, err := alltransports.ParseImageName(imageName)
+ srcRef, err := alltransports.ParseImageName(fmt.Sprintf("%s%s", decomposedImage.transport, imageName))
if err != nil {
return nil, errors.Wrapf(err, "unable to parse '%s'", inputName)
}