mirror of https://github.com/containers/podman.git
Simplify pullGoalFromPossiblyUnqualifiedName
Both imageParts and this function implicitly assume docker.Transport troughout, so instead of pretending to be flexible about DefaultTransport, just hard-code docker.ParseReference directly. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
e9721b757a
commit
788bc36021
|
@ -290,7 +290,7 @@ func (ir *Runtime) pullGoalFromPossiblyUnqualifiedName(inputName string) (*pullG
|
|||
} else {
|
||||
imageName = decomposedImage.assemble()
|
||||
}
|
||||
srcRef, err := alltransports.ParseImageName(fmt.Sprintf("%s%s", DefaultTransport, imageName))
|
||||
srcRef, err := docker.ParseReference("//" + imageName)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "unable to parse '%s'", inputName)
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ func (ir *Runtime) pullGoalFromPossiblyUnqualifiedName(inputName string) (*pullG
|
|||
if hasShaInInputName(inputName) {
|
||||
imageName = fmt.Sprintf("%s/%s", registry, inputName)
|
||||
}
|
||||
srcRef, err := alltransports.ParseImageName(fmt.Sprintf("%s%s", DefaultTransport, imageName))
|
||||
srcRef, err := docker.ParseReference("//" + imageName)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "unable to parse '%s'", inputName)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue