Skip to content

Commit

Permalink
Fix confusing variable naming in Pull
Browse files Browse the repository at this point in the history
The result of ParseImageName("docker://"...) is not a storageRef.

Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>

Closes: #1361
Approved by: rhatdan
  • Loading branch information
mtrmac authored and rh-atomic-bot committed Feb 27, 2019
1 parent b829ee3 commit 949709c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 949709c

Please sign in to comment.