From 553979e1fc38954eaa3bc5948eae9bdf7e885d36 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 27 Nov 2017 18:46:10 -0500 Subject: [PATCH] storage: API fixups github.com/containers/image/types.ImageReference.NewImage() can take a *github.com/containers/image/types.SystemContext now, so pass it one if pkg/storage/imageService.CanPull() has one to give it. Signed-off-by: Nalin Dahyabhai --- pkg/storage/image.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/storage/image.go b/pkg/storage/image.go index 99b15f3a..4ea8eb8c 100644 --- a/pkg/storage/image.go +++ b/pkg/storage/image.go @@ -184,7 +184,11 @@ func (svc *imageService) CanPull(imageName string, options *copy.Options) (bool, if err != nil { return false, err } - src, err := image.FromSource(rawSource) + sourceCtx := &types.SystemContext{} + if options.SourceCtx != nil { + sourceCtx = options.SourceCtx + } + src, err := image.FromSource(sourceCtx, rawSource) if err != nil { rawSource.Close() return false, err