Vendor in containers/buildah v1.19.3

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2021-01-29 11:57:20 -05:00
parent b59848a2b9
commit 280f332bd9
12 changed files with 95 additions and 16 deletions

View File

@ -150,10 +150,10 @@ func resolveImage(ctx context.Context, systemContext *types.SystemContext, store
return nil, "", nil, err
}
// If we could resolve the image locally, check if it was referenced by
// ID. In that case, we don't need to bother any further and can
// prevent prompting the user.
if localImage != nil && strings.HasPrefix(localImage.ID, options.FromImage) {
// If we could resolve the image locally, check if it was clearly
// referring to a local image, either by ID or digest. In that case,
// we don't need to perform a remote lookup.
if localImage != nil && (strings.HasPrefix(localImage.ID, options.FromImage) || strings.HasPrefix(options.FromImage, "sha256:")) {
return localImageRef, localImageRef.Transport().Name(), localImage, nil
}