Fix confusing variable naming in Pull

The result of ParseImageName("docker://"...) is not a storageRef.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>

Closes: #1361
Approved by: rhatdan
This commit is contained in:
Miloslav Trmač 2019-02-21 23:35:51 +01:00 committed by Atomic Bot
parent b829ee3f6b
commit 949709cd18
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ import (
"github.com/containers/image/transports/alltransports"
"github.com/containers/image/types"
"github.com/containers/storage"
"github.com/hashicorp/go-multierror"
multierror "github.com/hashicorp/go-multierror"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@ -176,11 +176,11 @@ func Pull(ctx context.Context, imageName string, options PullOptions) error {
}
spec := transport + storageRef.DockerReference().Name()
storageRef, err = alltransports.ParseImageName(spec)
dockerRef, err := alltransports.ParseImageName(spec)
if err != nil {
return errors.Wrapf(err, "error getting repository tags")
}
tags, err := docker.GetRepositoryTags(ctx, systemContext, storageRef)
tags, err := docker.GetRepositoryTags(ctx, systemContext, dockerRef)
if err != nil {
return errors.Wrapf(err, "error getting repository tags")
}