diff options
-rw-r--r-- | libpod/image/image.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index f773ab74a..28148b7c3 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -145,11 +145,11 @@ func (ir *Runtime) New(ctx context.Context, name, signaturePolicyPath, authfile defer span.Finish() // We don't know if the image is local or not ... check local first - newImage := Image{ - InputName: name, - imageruntime: ir, - } if pullType != util.PullImageAlways { + newImage := Image{ + InputName: name, + imageruntime: ir, + } localImage, err := newImage.getLocalImage() if err == nil { newImage.image = localImage @@ -168,6 +168,10 @@ func (ir *Runtime) New(ctx context.Context, name, signaturePolicyPath, authfile return nil, errors.Wrapf(err, "unable to pull %s", name) } + newImage := Image{ + InputName: name, + imageruntime: ir, + } newImage.InputName = imageName[0] img, err := newImage.getLocalImage() if err != nil { |